I want a script so that whenever i press a button my my boombox it plays a random song out of the list Here is the script...
local songs = {184745270}
local ransong = 0
script.Parent.ClickDetector.MouseClick:connect(function()
ransong = math.random(1,#songs)
script.Parent.Parent.MusicPart.Music.SoundId = ("http://www.roblox.com/asset/?id="..ransong)
script.Parent.Parent.MusicPart.Music:Play()
end)

4 comments
This doesnt work for some reason can you help me?
You only have a single ID in the list...
Im adding more later on xD
Well if you're trying to play a random song but have only a single song, obviously the song will not be random.