How do I /tp an Armor Stand to me but half a block away or something?



  • So I've been trying to /tp a "pet" which is an armor stand with a player head on it but when I try making it follow me it just teleports into me instead of next to me. Any tips?
    Thanks.



  • Here's a few commands that should help.

    Selector means the selector that selects the armor stand; for example, [name="pet"] or [tag="pet"].

    /execute at player run tp @e[selector] ^-0.5 ^ ^

    I'll break this command down.

    /execute at player

    This means "run everything after this at the location of player".

    run tp @e[selector]

    This means teleport the entities matched by @e[selector].

    ^0.5 ^ ^

    This is using Caret Positioning, meaning relative to the head of the target entity. However, remember that we are running the command at the location of the player, so it's relative to the player's head.

    The first caret (^0.5) means position 0.5 blocks left to the player's head.

    Every other value stays the same, becuase their is nothing after the caret.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2