I have a SFXEmitter I want to turn off through lua, however it still plays after setting the volume to 0. Since it stops when changing anything else manually through the world editor, I'm guessing there's something I have to call in order to update the Emitter. Here's my current code: Code: local function setRainSounds() local soundFXNormal = scenetree.findObject("Ambient_Sounds") if soundFXNormal then soundFXNormal.volume = 0.0 end end
Use the stop() to turn off the sound: Code: local function setRainSounds() local soundFXNormal = scenetree.findObject("Ambient_Sounds") if soundFXNormal then soundFXNormal:stop() end end If you want to turn it back on, use the play() function instead.