Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Full sound is not playing with shower?

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


1 comment

0

while true do loops the code below it. So your script plays the sound (restarts it) every 0.0001 seconds.

1 answer

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.