I've been on looking on YouTube for tutorials, but in the end I always get a bad result. Either the script doesn't work, or people make a script where the music is in a specific order. This is what I have right now, but I can't figure out what the problem is.
local Songs = {1062531124,1031544350,189078999,316561468,752710354,1326992990,272018606}
function PlayMusic()
local Song = Instance.new("Sound",game.Workspace.Sounds)
local ToPlay = Songs[math.random(1,#Songs)]
Song.SoundId = "rbxassetid://"..tostring(ToPlay)
Song:Play()
end
PlayMusic()
