Ok so I have a sound block that plays music for an area of my game. I need it to stop when you enter the next area I tried scripting a block that stops all sounds and then it goes to the other sound brick and plays the music for that area. But the block thats stops the sound isn't working. I need to stop all the sounds.How would I go about this?
b = script.Parent t = script.Parent.Sound
function onTouch()
t:stop()
end
b.Touched:connect(onTouch)

4 comments
It didnt work
@Tetris, make sure that the script.Parent is something that is somewhere in the workspace. Both "t" and the script need to be parented by the same object
:Stop() does not exist, use :Pause()
@verge, https://developer.roblox.com/api-reference/function/Sound/Stop