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?
Minecraft – TP entity to other armorstand You must specify which player you wish to perform this action on
minecraft-commandsminecraft-java-edition
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:
For the third option, you'll need to run a command like this to add the tag:
Then select them using:
@e[tag=IsPrisonGuard]
. This works because you can have spaces within quotations for NBT data, just not for selectors.