Minecraft – /tp command not working

minecraft-commandsminecraft-java-edition

So I Am making A Minecraft adventure map. I want to make a guardian type thing (an armor stand with a custom head and armor) that constantly floats 3 blocks Above you and 1 block along the X axis.

I Have A Miniature Armor stand as stated above named "Test1", that i want to float above me.
And My Ign is "OmegaUseless".

The command I have used to teleport the armor stand to me is:

This is a repeating command block. Needs Redstone.

/teleport @e[name="Test1",type=armor_stand] OmegaUseless

The Command I tried Using to teleport it above me is:

This is a chain command block, connected to the repeating command block.

/tp @e[name=Test1,type=minecraft:armor_stand] ~1 ~3 ~

But It Only teleports the armor stand above the command block, not me.

I am trying to first teleport the stand to me, then teleport it above itself so it's not on me. Also I would like to know how to make it face me.

Best Answer

Your first command is /teleport instead of /tp, this won't break it but it is inconsistent with the 2nd command. It helps for the purpose of brevity.

The 2nd command should be:

/execute as @e[name="Test1",type=minecraft:armor_stand] at @s run tp @s ~1 ~3 ~

If you wanted to squish it into a single command block, then:

/execute as @e[name="Test1",type=minecraft:armor_stand] at OmegaUseless run tp @s ~1 ~3 ~

The error is occurring because your second command is being run as and at the command block, like if you did the same command yourself in chat. In order to teleport relative to entities other than the command executor, you have to use /execute as/at.