I successfully registered teams (Red, Blue). I want to add players to the team. It currently is 3v3 map, where you need to have 6 players to play otherwise the game wont start at all. So i tried something like this, since i knew there are 6 players online, else the redstone signal wouldnt even have reached the "Add player to team"-Command block.

`scoreboard teams join Blue @r` works, adds 1 player to the team. Now i could just execute this block 3 times and the Blue team would have 3 players. Problem is, that @r randoms a player and it might happen that player Shiuyin would be rolled twice, thus the Blue team would end up having Shiuyin + another random player instead of 3.

I also tried something like

"scoreboard teams join Blue @r,@r,@r"

which gives a lot of bugs, something teams do have players "Player1, Player2, @r".

So i need something like "scoreboard teams join Blue @r" executed 3 times which only adds player who are currently not in a team.

I tried "scoreboard teams join Blue @r[team!=Blue]" but it somehow doesn't work.

Any solutions?