Minecraft – How to set radius of testfor command in minecraft

minecraft-commandsminecraft-java-edition

I have looked through many questions and have not found this, i would like to have it so the redstone activates once the player goes in a certain area, this is almost done but for some reason it is measuring the radius in chunks, not blocks, any advice?

Image of attempted command

I have tried everything, please help.

Best Answer

The m after r=2 is unnecessary and does not search for that number of chunks (thanks @Skylinerw). By adding it, the command block ignores the radius parameters and instead searches the entire world for the player. In order to search in a radius of 2 blocks, remove the m.

Your command should look like testfor @p[x=437,y=72,z=2363,r=2].