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

What is wrong with this multiple song looping script?

I've just made a script for music sound playing but seems when I go in to to game, I don't hear the music which mean I can't find a error in the script. What's wrong this script? It seems fine...I guess?

while true do
wait(3600)
end

script.Parent.Sound:Play()
wait(180)
script.Parent.Sound:Stop()
wait(0.01)
script.Parent.Sound2:Play()
wait(180)
script.Parent.Sound2:Stop()
wait(0.01)
script.Parent.Sound3:Play()
wait(180)
script.Parent.Sound3:Stop()
wait(0.01)
script.Parent.Sound4:Play()
wait(180)
script.Parent.Sound4:Stop()
wait(0.01)
script.Parent.Sound5:Play()

1 answer

✓ Accepted answer

The beginning of the script tells it to wait one hour, and when it's finished waiting an hour, wait another hour, and don't stop waiting an hour. After it stops (it doesn't) is when it does the other things after it.

Solution: get rid of the first 3 lines:

script.Parent.Sound:Play()
wait(180)
script.Parent.Sound:Stop()
wait(0.01)
script.Parent.Sound2:Play()
wait(180)
script.Parent.Sound2:Stop()
wait(0.01)
script.Parent.Sound3:Play()
wait(180)
script.Parent.Sound3:Stop()
wait(0.01)
script.Parent.Sound4:Play()
wait(180)
script.Parent.Sound4:Stop()
wait(0.01)
script.Parent.Sound5:Play()

This discussion is preserved as it was. New answers, comments, and votes are closed.