I'm trying to create a game in ROBLOX, but I want songs to be shuffled. As in: I have songs 1-5, after song 1 plays, any song 2-5 will play, and so on. I've tried a script to do this but it does not seem to be working.
local TableOfIDs = {"182696162","213751857","218655072","150429221","186073337","231246069","189701469","170172242","153057872","163816972","189319657","163779917","162179088","170990184","213770214","196183054"}
math.randomseed(tick())
while wait() do
script.Music:Stop()
script.Music.SoundId = "http://www.roblox.com/Asset?ID="..(TableOfIDs{math.random(1,#TableOfIDs)])
script.Music:Play()
wait(20)
end
Am I missing something?
Open to any suggestions.