I am trying to make multiple IDs play after another, but it won't play another ID after this stops. What'd I do wrong?
while wait() do for _,List in pairs(JSON) do Music.SoundId = "http://www.roblox.com/asset/?id="..tonumber(List.desc) script.SongName.Value = tostring(List.name) Music:Play() wait(1) repeat wait() until not Music.IsPlaying wait(1) end end
Well, sometimes the TimeLength and IsPlaying both break. If that's the case, I recommend you manually time the sound yourself. In that table of yours, add another parameter with the length of the sound, and have it wait that length. That's the other option, if the above to methods fail.
You actually didn't do anything wrong. The IsPlaying
Property on the roblox sound object is broken, and has been neglected a fix for awhile now. It doesn't change when the sound is done, or starts. It stays idle forever.
You need to use the wait
function, with arguments of Music.TimeLength
while wait() do for _,List in pairs(JSON) do Music.SoundId = "rbxassetid://"..tonumber(List.desc) script.SongName.Value = tostring(List.name) Music:Play() wait(Music.TimeLength) end end