I encountered a problem that when the round ends, the teams move. But using this code, the player always ends up in team 1, although he is in team 2. I tried to test it in every possible way, but I couldn’t find a solution. Does anyone have any thoughts on this matter. I checked via verse there are two teams in the game
AllPlayers := GetPlayspace().GetPlayers()
for (Player : AllPlayers):
if (Agent := player[Player]):
if(GetPlayspace().GetTeamCollection().GetTeam[Agent] = Teams[0]):
Print("TEAM 1")
TeleportRed.Teleport(Agent)
else if(GetPlayspace().GetTeamCollection().GetTeam[Agent] = Teams[1]):
Print("TEAM 2")
TeleportBlue.Teleport(Agent)