Minecraft – How to teleport players at specific coordinates

minecraft-bedrock-editionminecraft-commands

I saw this question asking for the same thing and tried it on PE, but it didn't work. I put execute @a[x=11, y=4, z=0, r=1] ~ ~ ~ tp @p 11 4 -2 in a repeating command block, but it ignored the x=11, y=4, z=0 and r=1 and constantly kept teleporting me even though I was not on x=11, y=4, z=0. If it is possible, how would you teleport players that are on specific coordinates?

I am on single player and on version 1.1.5.

Best Answer

The x, y and z arguments in the target selector only move the origin of where to search for players, you still need a radius (r) or range (dx, dy, dz).

Also you don't need execute in this example, you can just put the target selector in the `tp' command.

So your command could for example look like this:

tp @a[x=11,y=4,z=0,r=1] 11 4 -2

A tip for dealing with repeating command blocks with teleport commands in them: In case anything goes wrong and you're stuck in a teleporting loop, write down the coordinates of the repeating command block beforehand and if it's out of control, execute the command /blockdata <coordinates> {auto:0} to stop it.