I have been working on this for a while and I don't know why. This script keeps breaking after like 10 mins.
local radio = script.Parent
radio.Ended:Connect(function(shuffle)
local song = math.random(1,20)
if song == 1 then
if radio.SoundId == "rbxassetid://1566658380" then
return(shuffle)
else
radio.SoundId = "rbxassetid://1566658380"
end
elseif song == 2 then
if radio.SoundId == "rbxassetid://2385614054" then
return(shuffle)
else
radio.SoundId = "rbxassetid://2385614054"
end
elseif song == 3 then
if radio.SoundId == "rbxassetid://1846422780" then
return(shuffle)
else
radio.SoundId = "rbxassetid://1846422780"
end
elseif song == 4 then
if radio.SoundId == "rbxassetid://255312153" then
return(shuffle)
else
radio.SoundId = "rbxassetid://255312153"
end
elseif song == 5 then
if radio.SoundId == "rbxassetid://320026033" then
return(shuffle)
else
radio.SoundId = "rbxassetid://320026033"
end
elseif song == 6 then
if radio.SoundId == "rbxassetid://177272902" then
return(shuffle)
else
radio.SoundId = "rbxassetid://177272902"
end
elseif song == 7 then
if radio.SoundId == "rbxassetid://163628975" then
return(shuffle)
else
radio.SoundId = "rbxassetid://163628975"
end
elseif song == 8 then
if radio.SoundId == "rbxassetid://243789412" then
return(shuffle)
else
radio.SoundId = "rbxassetid://243789412"
end
elseif song == 9 then
if radio.SoundId == "rbxassetid://336955829" then
return(shuffle)
else
radio.SoundId = "rbxassetid://336955829"
end
elseif song == 10 then
if radio.SoundId == "rbxassetid://343057937" then
return(shuffle)
else
radio.SoundId = "rbxassetid://343057937"
end
elseif song == 11 then
if radio.SoundId == "rbxassetid://177273163" then
return(shuffle)
else
radio.SoundId = "rbxassetid://177273163"
end
elseif song == 12 then
if radio.SoundId == "rbxassetid://346785617" then
return(shuffle)
else
radio.SoundId = "rbxassetid://346785617"
end
elseif song == 13 then
if radio.SoundId == "rbxassetid://1846422987" then
return(shuffle)
else
radio.SoundId = "rbxassetid://1846422987"
end
elseif song == 14 then
if radio.SoundId == "rbxassetid://1840824372" then
return(shuffle)
else
radio.SoundId = "rbxassetid://1840824372"
end
elseif song == 15 then
if radio.SoundId == "rbxassetid://1846421752" then
return(shuffle)
else
radio.SoundId = "rbxassetid://1846421752"
end
elseif song == 16 then
if radio.SoundId == "rbxassetid://1846422733" then
return(shuffle)
else
radio.SoundId = "rbxassetid://1846422733"
end
elseif song == 17 then
if radio.SoundId == "rbxassetid://378632345" then
return(shuffle)
else
radio.SoundId = "rbxassetid://378632345"
end
elseif song == 18 then
if radio.SoundId == "rbxassetid://1047855838" then
return(shuffle)
else
radio.SoundId = "rbxassetid://1047855838"
end
elseif song == 19 then
if radio.SoundId == "rbxassetid://1345134355" then
return(shuffle)
else
radio.SoundId = "rbxassetid://1345134355"
end
elseif song == 20 then
if radio.SoundId == "rbxassetid://289239824" then
return(shuffle)
else
radio.SoundId = "rbxassetid://289239824"
end
end
radio.TimePosition = 0
wait(2)
radio.Playing = true
end)

3 comments
Lol, we legit did the same answer at he same time
Thanks man, I did.
Although in line 26 it needs to be "rbxassetid://"..chooseSong();