error: 10:26:56.894 - ServerScriptService.Main:41: attempt to perform arithmetic (sub) on nil and number
local status = game.ReplicatedStorage.Status
local Maps = game.ReplicatedStorage.Maps:GetChildren()
local Maps = game.ReplicatedStorage.Maps:GetChildren()
while true do for i = 1,10 do status.Value = "Intermission "..10-i wait(1) end
local Random = math.random(1, #Maps)
local map = Maps[Random]:Clone()
map.Parent = workspace
status.Value = "Todays Challenge Will Be "..map.Name
wait(4)
local players = game.Players:GetChildren()
for i = 1,#players do
if players[i].Character ~= nil then
local spawnLocation = math.random(1,#workspace.Teleports:GetChildren())
players[i].Character:MoveTo(workspace.Teleports:GetChildren()[spawnLocation].Position)
players[i].Character.Parent = workspace
end
end
local rounddLength = 20
local canWin = true
if map:FindFirstChild("Obby")then
map.EndPart.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
canWin = false
status.Value = hit.Parent.Name.."Has Beaten This Deadly Challenge"
end
end)
end
repeat
roundLength = roundLength -1
status.Value = "Time Remaining"
wait(1)
until roundLength == 0 or canWin == false or #workspace.ingame:GetChildren() == 0
wait(3)
map:Destrory()
end

2 comments
roundLength is nil and also, It is impossible to perform arithmetic on a nil value.
edited my answer