I'm making a maze, and at certain parts the players need to be teleported. This is my command so far:

/tp @a [x=-1034, y=34, z=-302 r=2] ~ ~ ~30

So this says, if a player is within 2 blocks of these coordinates then teleport the player 30 blocks south (positive z).

I can't have the command blocks at x=-1034, y=34 and z=-302, which is why that part of the command is necessary.

Can someone tell me if this command exists please!

  • 2
    Please do some research before posting a question. This problem has come up before, and the fact that it's so basic means you're not trying hard enough to solve your own problem first.
    – MBraedley
    Commented Nov 8, 2015 at 5:59
  • If the command exists? So try it yourself?...
    – user92092
    Commented Nov 8, 2015 at 6:18

1 Answer 1


The reason why it isn't working is because there is a space between the @a and the square brackets.

This command should work.

/tp @a[x=-1034,y=34,z=-302,r=2] ~ ~ ~30
  • If this helped, please click the tick next to the votes. Thanks! Commented Nov 8, 2015 at 5:45
  • That command won't work. You still have spaces, and you're missing a comma.
    – MBraedley
    Commented Nov 8, 2015 at 5:51
  • @MBraedley How stupid of me, I automatically fixed the space and forgot to check the rest :) fixed Commented Nov 8, 2015 at 6:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .