So recently I've decided to make a new showcase and wanted to try my hand at making an ambient music player, one that is stuck to a Part and the farther away you go, the quieter it becomes, which is simple enough in it's own right as it's built in. My problem is with actually Scripting a working playlist that goes through a list of 4 songs and starts back over at the beginning. Every single time I've tried a new script it'll just loop the first song, or play all four at the same time without fail. I'm pretty bad when it comes to Lua so any help is appreciated This is the script I tried using:
local sound1 = 131072261 local sound2 = 130872377 local music = script.Parent
while true do wait() music.SoundId = "rbxassetid://"..sound1 music:Play() music.Ended: wait() music.SoundId = "rbxassetid://"..sound2 music:Play() music.SoundId = "rbxassetid://"..sound3 music:Play() music.Ended: wait() music.SoundId = "rbxassetid://"..sound4 music:Play() music.Ended: wait() end

4 comments
try music:Stop() after its done playing?
There's not sound3 and sound 4
This script worked perfectly for me only if I delete the sound3 and sound4 lines
I've done this before. I can help you later if you want.