so im making a 2v2 map and i have a team selector but if the players dont choose their teams manually, the code will just put all players in team 1
OnTeamSelectionEnd(MaybeAgent:?agent):void=
for(Player: GetPlayspace().GetPlayers()):
if(Team1.Count()<2):
if(not Team1.FindOnTeam[Player]):
if(Agent:= agent[Player]):
Team1.TeamSelector.ChangeTeam(Agent)
else if(Team2.Count()<2):
if(not Team2.FindOnTeam[Player]):
if(Agent:= agent[Player]):
Team2.TeamSelector.ChangeTeam(Agent)
Loadout.LoadoutTimer.Start()
LoadoutSelectSpawners.Teleport(Player)