0

As you can see the question is in the title. I've tried:

/tp @p @e[type=ArmorStand,name=the armor stand name] ~ ~ ~2

But it doesn't work.

2
  • What command have you used to summon the armor stand?
    – Reflexive
    Mar 4 '17 at 18:58
  • /summon ArmorStand ~ ~ ~ {CustomName:"whatever"}
    – user181021
    Mar 4 '17 at 19:06
1

I recommend doing two commands.

  1. /tp @p @e[type=armor_stand,name=Name]

  2. /tp @p ~ ~ ~-2

0

If you teleport a player to a different entity like the example you used, you cannot include (relative) coordinates. It's or to a different entity, or to coordinates. You can solve your problem using a /execute

/execute @e[type=armor_stand,name=NAME] ~ ~ ~2 teleport @p ~ ~ ~
2
  • This does nothing. I have tested it and it will teleport the player to its current position.
    – Reflexive
    Mar 4 '17 at 19:25
  • This won't work with /tp, because /tp's teleport location is relative to the target (in which the player will be teleported to themselves, and the origin modification done with /execute only changes who the target can be rather than where they are teleported). You'd want to use /teleport instead, which would be relative to the executor (and then the origin change from /execute can work effectively). Prior to /teleport's introduction, you would have to use two /tp commands: one to teleport target to target, and another to teleport target 2 blocks away.
    – Skylinerw
    Mar 4 '17 at 19:27

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.