local Stoper = script.Parent
local Sound = game.Workspace.Sound
function onClick()
Sound.Volume = 0
Sound:Remove()
end
Stoper.ClickDetector.MouseClick:connect(onClick)
It worked be4 the recent update today D:
local Stoper = script.Parent
local Sound = game.Workspace.Sound
function onClick()
Sound.Volume = 0
Sound:Remove()
end
Stoper.ClickDetector.MouseClick:connect(onClick)
It worked be4 the recent update today D:
:Remove() only sets the parent to nil, use Destroy() to remove it, if you want the sound to stop you have to destroy it.
local Stoper = script.Parent
local Sound = game.Workspace.Sound
function onClick()
Sound.Volume = 0
Sound:Destroy() -- we are using the Destroy() method instead of the Remove() method here
end
Stoper.ClickDetector.MouseClick:connect(onClick)
It won't work D:, I think robloxs Recent update fked most things up, Because the BodyVelocity is ruined too!
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
I don't see anything wrong with the coding but maybe unless the paths are incorrect.