Here's my code. Whenever i run it it gets to the print("continue"), prints the list, then it says the script timed out before resuming. Any help is welcome. :)
--Made by iiMeltex
local roundtime = 60 * 3
local finaletime = 1* 60
local intermissiontime = 15
print("Loaded 1 ")
local serverstorage = game:GetService("ServerStorage")
local replicatedstorage = game:GetService("ReplicatedStorage")
local debris = game:GetService("Debris")
local maps = serverstorage:WaitForChild("Maps")
local mapholder = game.Workspace:WaitForChild("Mapholder")
print("Loaded 2 ")
local event = replicatedstorage:WaitForChild("RemoteEvent")
local statustag = replicatedstorage:WaitForChild("StatusTag")
local timertag = replicatedstorage:WaitForChild("TimerTag")
print("Loaded 3 ")
while true do
while true do
wait(4)
contestants = {}
for _,player in pairs(game.Players:GetPlayers()) do
if player and player.Character then
local humanoid = player.Character:WaitForChild("Humanoid")
if humanoid and humanoid.Health > 0 then
table.insert(contestants, player)
end
end
end
if #contestants >= 3 then
print("We out")
break
else
statustag.Value = "Waiting For More Players"
timertag.Value = -1
print("Continue ")
print(contestants)
end
end
print("Loaded 7 ")
--load a random map
statustag.Value = "Loading A Random Map"
timertag.Value = -1
mapholder:ClearAllChildren()
wait(2)
local allmaps = maps:GetChildren()
local newmap = allmaps[math.random(1, #allmaps)]:clone()
newmap.Parent = game.Workspace.Mapholder
wait(2)
print("Loaded 8 ")

2 comments
that is not the full code.. there is a wait at the end of the first while true loop and i need it because it is what keeps the game rounds going. But nonetheless thank you :)
oh...