Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Script won't work 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:

1 comment

0

I don't see anything wrong with the coding but maybe unless the paths are incorrect.

1 answer

: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)

1 comment

0

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.