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
7 years ago
local nyancat = script.Parent.ClickValue
local soundid = game.Workspace.PickAToonSongs
if nyancat.Value == 1 then 
soundid:Stop()  
end
0
Thing is the script does not work it wont shut down my sound and i have changed nearly all the condtions sammiya1 134 — 7y

1 answer

Log in to vote
1
Answered by 7 years ago

I would use a Changed() event.

Here:

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

Answer this question