I've been trying to do /testfor @a [r=5] for something, but it wont work! It just gives me an error message like "Data tag" something something "Unexpected "[" as first char." I've done the command before and it works, so why won't it work now??


Once again, you have put a space in between the @a and the radius selector.

Correct command: /testfor @a[r=5]

A redstone comparator coming out of the block will emit a signal when this is true.

  • oh my god I seriously did it again xD I feel so dumb lol. Thanks :P
    – xXPikminXx
    Apr 20 '15 at 22:56

You put a space in between @a and [r=5].

The correct command is this:

/testfor @a[r=5]

The "/" is optional.


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.