Hello. I made a music playlist. It plays one random song, then another song doesn't play.
Here is part of the script I have.
function Music()
local rand = math.random(1,50)
if rand == 1 then
script.Sound.SoundId = 'rbxassetid://755156652'
script.Sound:Play()
wait(188)
Music()
end
if rand == 2 then
script.Sound.SoundId = 'rbxassetid://186783853'
script.Sound:Play()
wait(120)
Music()
end
if rand == 3 then
script.Sound.SoundId = 'rbxassetid://685388224'
script.Sound:Play()
wait(120)
Music()
end
The full script goes on for the different 50 'rands'. Is it the function that is wrong?
Help would be appreciated.

5 comments
Are you calling the Music function only once?
No, I call it each time a song is over.
The number is from 1 to 50. Do you have 50 statements?
Yes I do, I only posted 3 of them because they are all the same (except the sound ids)
I was wrong in my problem, it doesn't play any music whatsoever. The output says 'Sound Workspace.Script.Sound Failed to load rbxassetid://0'. So it has to be a problem with the script