So I've been wondering how exactly would I add a random playlist of music. I have a folder in workspace called Music, and then under that folder two folders, with one being called lobby music, and the other called map music. I'm more concerned about the lobby music, because once I figure out how to do this, I can easily do it with the map music.
Under the Lobby music folder, there are three sounds and they all have the sound IDs.
(This is part of the script, it is a round script).
local replicatedstorage = game:GetService('ReplicatedStorage')
local status = replicatedstorage:WaitForChild('InfoValue')
local mapstorage = game.Workspace:WaitForChild('mapStorage')
local lobmusic = game.Workspace.Music.LobbyMusic
while true do
while game.Players.NumPlayers < 1 do
status.Value = 'Two Players are needed to start a round'
repeat wait(2) until game.Players.NumPlayers >= 2
end
wait(3)
lobmusic:Play()
for i = 30,0,-1 do
status.Value = 'Intermission ('..i..')'
wait(1)
end
It works, I just wonder how I would make it to where the music randomizes each time.

1 comment
I was also testing something where it does the 'Two Players are neede to start a round' so I could test it myself, but I didn't change the >= 2 part. Just ignore that.