Server script (in serverscriptservice):
local lobby_Duration = 10
local round_Duration = 10
local maps = game:GetService('ReplicatedStorage'):WaitForChild('Map'):GetChildren()
local timerval = game.ReplicatedStorage:WaitForChild("TimerValue")
local function RTimer ()
while wait() do
for l = lobby_Duration, 0, -1 do
timerval.Value = 'Intermission: '..l
wait(1)
if l == 0 then
local map = maps[math.random(#maps, 1)] -- change to your map name
timerval.Value = 'Teleporting players to '..map.Name
wait(1)
map.Parent = workspace
local players = game.Players:GetChildren()
for i = 1, #players do
players[i].Character:MoveTo(Vector3.new(-122.5, 55.5, -41.5))
end
wait(1)
for g = round_Duration,0, -1 do
timerval.Value = 'Round '..g..' seconds left'
wait(1)
if g == 0 then
timerval.Value = 'Round over'
wait(2)
timerval.Value = 'Teleporting players to lobby'
wait(1)
for i = 1, #players do
players[i].Character:MoveTo(Vector3.new(-122.5, 55.5, 2.5))
end
map.Parent = maps
wait(1)
-- repeat again
end
end
end
end
end
end
spawn(RTimer)

3 comments
Then it returns an error invalid argument #2 to 'random' (interval is empty)
Could it be line 3 where you havent defined what map is? im talking about ' local maps = '
@Br0kenM1ndss that means that your maps folder has 0 children (maps) inside it