0

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 Nov 8 '15 at 5:59
  • If the command exists? So try it yourself?... – user92092 Nov 8 '15 at 6:18
3

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
| improve this answer | |
  • If this helped, please click the tick next to the votes. Thanks! – angussidney Nov 8 '15 at 5:45
  • That command won't work. You still have spaces, and you're missing a comma. – MBraedley Nov 8 '15 at 5:51
  • @MBraedley How stupid of me, I automatically fixed the space and forgot to check the rest :) fixed – angussidney Nov 8 '15 at 6:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.