Here is the code, the full sound isnt playing. Any suggestions for my current code?
while true do
if script.Parent.Parent.Parent.Button.Value.Value == 1 then
script.Parent.Sound:Play()
else
script.Parent.Sound:Stop()
end
wait()
end
Here is the code, the full sound isnt playing. Any suggestions for my current code?
while true do
if script.Parent.Parent.Parent.Button.Value.Value == 1 then
script.Parent.Sound:Play()
else
script.Parent.Sound:Stop()
end
wait()
end
I don't know what button value is but this would be way better if it stays '1'
while true do
if script.Parent.Parent.Parent.Button.Value.Value == 1 then
if script.Parent.Sound.IsPlaying == false then
script.Parent.Sound:Play()
end
else
script.Parent.Sound:Stop()
end
wait()
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
while true do loops the code below it. So your script plays the sound (restarts it) every 0.0001 seconds.