How do I teleport players based on their teams?
I'm making a costum map which uses comandblocks to teleport players to a spot. The commandblocks are setup under two rooms. (One for team red players and one for team blue players). I need to teleport all players frome one team to a spot (-100 100 -100). and the other team to another spot (100 100 -100).
The problem is that the comand blocks used to teleport team blue are closer to the team red room. This means that I can't just setup the commandblock like this:
tp @a[r=10] 100 100 -100
How can I make shure that one team gets telepoarted to the right area.
Note: This is just an example, there are over 100 commandblocks that need to work. This probebly means that timing it right requires a lot of redstone experiance and is almost inpossibile. The best way would be if there is a command I can just use.
Pictures about "How do I teleport players based on their teams?"



Quick Answer about "How do I teleport players based on their teams?"
How do you teleport players to players?
You can teleport other players, too. Just type their username before the coordinates \u2014 so if you're trying to teleport a player named JohnDoe, you'll type: /tp JohnDoe 70 70 70. And if all you want is to teleport yourself to JohnDoe (or any other player), just type: /tp JohnDoe.How do you randomly teleport a player?
Try the /spreadplayers command, which spreads entities in a random area. The syntax is /spreadplayers <x> <z> <spreadDistance> <maxRange> <respectTeams> <player \u2026> In your case, you might want to try something like /spreadplayers ~ ~ 0 10000 false @a[r=5,c=1] .What is the command to teleport a player in Minecraft?
You can teleport to a set of coordinates or teleport another player using the /tp command in Minecraft (see also /teleport command).Tag, Team, Teammsg, Teleport (1.15-1.16) (All Commands Series)
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Mike, Pixabay, Joe Calomeni, Alexander Nadrilyanski
