How to make round system ( with turns and 3 teams )

You can write your topic however you want, but you need to answer these questions:

  1. So, my friend is trying to make a ULC game( undertale last corridor ) and I’m trying to make a round system ( also there is 3 teams: Chara, Sans, Lobby only one can become S team and other players are 3 are C team, L team this is the people who died ( or just joined ))

  2. So, I don’t know how to make a round system (Like ULC), The issue is that the system doesn’t separate the player’s team (Chara and Sans) most of the time, and every time the round starts, it ends immediately.