How do you teleport players at specific coordinates?
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.