So basically, I've been making a game and I've added a script which adds multiple songs instead of one. So, when I test out the game, the music starts but they ALL start at once. Sound1 is located in the workspace, sound2 is inside sound1, sound 3 inside sound2 so on so forth, anyways, here's the script:
local sound1 = 2529519176
local sound2 = 500155118
local sound3 = 1930853637
local sound4 = 1468374269
local sound5 = 2639575602
local music = script.Parent
while true do
wait()
music.SoundId= "rbxassetid://"..sound1
music:Play()
music.Ended: wait()
music.SoundId= "rbxassetid://"..sound2
music:Play()
music.Ended: wait()
music.SoundId= "rbxassetid://"..sound3
music:Play()
music.Ended: wait()
music.SoundId= "rbxassetid://"..sound4
music:Play()
music.Ended: wait()
music.SoundId= "rbxassetid://"..sound5
music:Play()
music.Ended: wait()
end

1 comment
Wait() doesn't stop the script; the script keeps going after the Wait() listener is established. Use repeat loops.