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

My Sound Will Not Stop When Value is 1?

Asked by
sammiya1 134
8 years ago
1local nyancat = script.Parent.ClickValue
2local soundid = game.Workspace.PickAToonSongs
3if nyancat.Value == 1 then
4soundid:Stop() 
5end
0
Thing is the script does not work it wont shut down my sound and i have changed nearly all the condtions sammiya1 134 — 8y

1 answer

Log in to vote
1
Answered by 8 years ago

I would use a Changed() event.

Here:

1local nyancat=script.Parent.ClickValue
2local soundid=game.Workspace.PickAToonSongs
3nyancat.Changed:connect(function()
4if nyancat.Value==1 then
5soundid:Stop()
6end
7end)
0
did the trick!!!!! Thanks sammiya1 134 — 8y
Ad

Answer this question