TP entity to other armorstand You must specify which player you wish to perform this action on

TP entity to other armorstand You must specify which player you wish to perform this action on - Black male musicians with wind instrument performing song near parking

I'm trying to make a cutscene type thing where a zombie (prison guard) talks to you, then turns round and walks down a path. I know how to do the walking thing, but the turning is more difficult. I've spawned an invisible armor stand (LogPrisonGuard1) at the dimensions I want him to turn to, and I'm doing /minecraft:tp @e[name="Prison Guard"] @e[type=ArmorStand,name=LogPrisonGuard1]. When it activates however, I get this error: You must specify which player you wish to perform this action on. Any help?



Best Answer

The problem is with the @e[name="Prison Guard"] selector; you cannot use spaces in selectors, nor can you put quotation marks around strings in selectors.

I believe the error you are getting is caused by Minecraft understanding the command as having 3 arguments, which matches the /tp overload that can be used in chat but not in command blocks:

Command : /minecraft:tp
<x> : @e[name=Prison
<y> : Guard"]
<z> : @e[type=ArmorStand,name=LogPrisonGuard1]


Some potential solutions are to:

  1. Select the guard based on something else (e.g: position, tags, team)
  2. Give the guard a name without spaces (Warden, perhaps?)
  3. Use their CustomName NBT to first give them a tag, then select them from that tag.

For the third option, you'll need to run a command like this to add the tag:

/scoreboard players tag @e add IsPrisonGuard {CustomName:"Prison Guard"}

Then select them using: @e[tag=IsPrisonGuard]. This works because you can have spaces within quotations for NBT data, just not for selectors.




Pictures about "TP entity to other armorstand You must specify which player you wish to perform this action on"

TP entity to other armorstand You must specify which player you wish to perform this action on - Woman in Red Tank Top Jumping on Obstacle
TP entity to other armorstand You must specify which player you wish to perform this action on - Woman in a Red Jersey Playing Football
TP entity to other armorstand You must specify which player you wish to perform this action on - Man Catching Soccer Ball on Field





Armorstand Commands for 1.18 Minecraft!




More answers regarding tP entity to other armorstand You must specify which player you wish to perform this action on

Answer 2

Fixed with /entitydata @e[name=Warden] {Rotation:[180f,4f]} This data tag effects the yaw and pitch of the entity, changing the way they look. If you still need to move the entity, and you are getting this problem, have one command block that tp's them to the place, then use the above command.

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Kelly, Andrea Piacquadio, Erik Geiger, Pixabay