I don't know what's wrong with this script. I tested it and I got a error?
--Game Script local settings = { GameTime = 10, --Minutes Admins = {"devSeldom"}, Blue_Team = {}, Red_Team = {}, Maps = {game.Lighting.Forest}, CurrentMap = nil, SpawnActive = false } function newgame() for i,v in pairs(settings.Blue_Team) do v = nil end for i,v in pairs(settings.Red_Team) do v = nil end for i,v in pairs(game.Players:GetChildren()) do if #settings.Blue_Team < #settings.Red_Team then table.insert(settings.Blue_Team,player) end if #settings.Blue_Team > #settings.Red_Team then table.insert(settings.Red_Team,player) end if #settings.Blue_Team == #settings.Red_Team then table.insert(settings.Blue_Team,player) end end if settings.CurrentMap ~= nil then settings.CurrentMap:remove() newmap = settings.Maps[math.random(1,#settings.Maps)] end spawnactive = true end game.Players.PlayerAdded:connect(function(player) if #settings.Blue_Team < #settings.Red_Team then table.insert(settings.Blue_Team,player) end if #settings.Blue_Team > #settings.Red_Team then table.insert(settings.Red_Team,player) end if #settings.Blue_Team == #settings.Red_Team then table.insert(settings.Blue_Team,player) end end) game.Players.PlayerRemoved:connect(function(player) for i,v in pairs(settings.Blue_Team) do if v == player then v:remove() end end for i,v in pairs(settings.Red_Team) do if v == player then v:remove() end end end)