Minecraft Bedrock Edition Commands – How to Teleport Random Players to Different Locations

minecraft-bedrock-editionminecraft-commands

So I am making an adventure map when I ran into a problem that might be impossible to solve with the limitations of bedrock edition.
So what I wanted to know is, can I randomly teleport players to certain positions without the chance of more than 1 player teleporting in the same position?

Best Answer

If you know approximately where everyone is going to be before they are teleported (i.e. a lobby), put some armor stands down, name them something like spawn_0 and a bunch of different ones and then tp them with:

execute @e[type=armor_stand,name="spawn_0"] ~ ~ ~ tp @r[x=5,y=10,z=5,r=30] @s

Have that happen as many as you want, like spawn_1, spawn_2, etc. Obviously adjust r for your needs. Adjust x=, y=, z= to where your lobby/place before people are teleported.

If you don't know where anyone is going to be, you may want to look into the /tag command. This answer should suffice for most situations, though.