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

Full sound is not playing with shower?

Asked by
RBLXHS 9
6 years ago
Edited 6 years ago

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


0
while true do loops the code below it. So your script plays the sound (restarts it) every 0.0001 seconds. awesomeipod 607 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago
Edited 6 years ago

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



Ad

Answer this question