Arqade is a question and answer site for passionate videogamers on all platforms. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Have you tried specifying the player you want to perform that action on? – ardaozkal Jan 17 at 16:23
I want to perform the action on all the minecarts within a 21 block radius of the command block. – Merlin04 Jan 17 at 16:29
up vote 6 down vote accepted

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 ~
share|improve this answer
Aww, you beat me to the answer :P – Keith M Jan 17 at 16:38

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

share|improve this answer
I was trying to teleport minecarts, not players. Please see the accepted answer for what I was looking for. – Merlin04 Jan 17 at 22:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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