2

I am trying to make a "Minecart Elevator" using command blocks. My main block has this command: /tp @e[type=MinecartRideable, r=21] ~ ~+3.3 ~. When I don't have the , r=21 part, my command works, just without the radius. But, when I add the radius back in, I get this error:

You must specify which player you wish to perform this action on. 

How can I fix this?

2
  • Have you tried specifying the player you want to perform that action on?
    – ave
    Commented Jan 17, 2016 at 16:23
  • I want to perform the action on all the minecarts within a 21 block radius of the command block.
    – Merlin04
    Commented Jan 17, 2016 at 16:29

2 Answers 2

6

You cannot have spaces in target selectors. It is assuming you are skipping to the next part of the command's syntax.

/tp @e[type=MinecartRideable,r=21] ~ ~+3.3 ~
1
  • Aww, you beat me to the answer :P
    – Keith M
    Commented Jan 17, 2016 at 16:38
-1

Just use the nearest player command, /tp @p[r=3] ~ ~+3.3 ~

1
  • 2
    I was trying to teleport minecarts, not players. Please see the accepted answer for what I was looking for.
    – Merlin04
    Commented Jan 17, 2016 at 22:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.