Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Script works on studio but not in roblox?

Asked by
KenzaXI 166
9 years ago
local Stoper = script.Parent
local Sound = game.Workspace.Sound
function onClick()
    Sound.Volume = 0
    Sound:Remove()
end
Stoper.ClickDetector.MouseClick:connect(onClick)

I've tried putting in a LocalScript but it still doesn't work! any help will be appreciated Thanks.

1 answer

Log in to vote
0
Answered by 9 years ago

I don't know why, but volume with sound is...broken. Try stopping the sound.

local Stoper = script.Parent
local Sound = game.Workspace.Sound
function onClick()
    Sound:Stop()
    Sound:Remove()
end
Stoper.ClickDetector.MouseClick:connect(onClick)

0
Unfortunately it didn't D: Thanks for helping though, I appreciate it. KenzaXI 166 — 9y
Ad

Answer this question