4

I have a clock leading to a command block with this command:

/execute @p[r=4] ~ ~ ~ /tp @p ~-20 ~-5 ~

But when I get within 4 blocks nothing happens, the previous output box is blank.
What can I do to fix it?

  • 2
    FYI, you should not be using /execute in this manner. /tp has a target selector for you to use. /execute should only be used when the sender or origin needs to change, which is not needed here. It would only serve to increase the number of commands to process: /tp @p[r=4] ~-20 ~-5 ~ – Skylinerw Jan 31 '16 at 17:23
2

Just do:

/tp @p[r=5] ~-20 ~-5 ~
  • 5
    While this should fix the problem, it would be good if you could add a little explanation. – DBS Jan 31 '16 at 18:27
  • why r=5? shouldn't it be r=4? – pca006132 Mar 10 '17 at 11:29
-1

Nevermind, the clock I had was too fast, I slowed it down and it works now.

  • 8
    Speed is not the cause. Command blocks can be activated at the full 20t/s that the game runs. If you were using a comparator clock, the redstone dust closer to the comparator is not turning off, but rather decreasing in signal strength. You need to extend the signal so that it turns off in order to pulse the command block, rather than send a constant signal. – Skylinerw Jan 31 '16 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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