Are you sure the pig is being teleported? That sounds not quite right to me. So what the /tp command does is to teleport an entity relative to its previous position (/tp @e ~ ~5 ~ will teleport every entity 5 block into the air); /teleport, on the other hand, teleports an entity relative to the executors position (as you would expect it). So /teleport @e ~ ~5 ~ will teleport everything 5 blocks above you (or your previous position). (Btw. please don't try these commands since minecraft isn't especially happy about targeting every entity.)
Back to your command: I would suggest this would teleport every armor stand independent from any pig.
I'd recommend MCStacker, Tellraw Generator and every other well made site for commands to everyone, no matter whether newbie or experienced commandblock-er.
I am trying to make a armorstand spawn next to a pig but with certain adjustments. The command I currently have is here:
But after looking at the outputs, I found out the pig was teleporting to itself. How would I fix this?
Are you sure the pig is being teleported? That sounds not quite right to me. So what the /tp command does is to teleport an entity relative to its previous position (/tp @e ~ ~5 ~ will teleport every entity 5 block into the air); /teleport, on the other hand, teleports an entity relative to the executors position (as you would expect it). So /teleport @e ~ ~5 ~ will teleport everything 5 blocks above you (or your previous position). (Btw. please don't try these commands since minecraft isn't especially happy about targeting every entity.)
Back to your command: I would suggest this would teleport every armor stand independent from any pig.
What I would assume to work as expected is:
/execute @e[type=pig] ~ ~ ~ teleport @e[type=armor_stand] ~.6 ~-.9 ~
Hope this helps 😉
I'd recommend MCStacker, Tellraw Generator and every other well made site for commands to everyone, no matter whether newbie or experienced commandblock-er.
sorry or the late reply,
i never knew about that command, but it works. thank you for the answer.