If I need to elaborate on the subject, I did not use a classic lobby system, it assigns players to a level where they can travel and have fun, and when the server starts the game, it assigns them to the level where the actual game will be played, but when 1 player switches to team a, this is not the same at the level where the game will be played at the lobby level, it assigns him to a different team (default team)