Minecraft – Teleport unknown amount of players to a specific area

minecraft-bedrock-editionminecraft-commands

I'm making a server full of mini-games, and I'm running into small problems on specific games. I got everything set up except for this issue:

In racing games, I'm having trouble teleporting the winner (or top 3, I know how to place them) to a "podium": I don't know how to let the game know how many players there are, and teleport the winners into one area and everybody else into another.

Best Answer

I'm not entirely sure how to fix the first problem but the second one can be solved by using /tag (Insert target selector for winning players) add Winners and then using /tp @a [tag=!Winners] <x,y,z> to teleport the rest of the players. /tag gives a specific data tag to players or entities that helps specify who you want your commands to affect.