Minecraft TestFor command help

I am using the testifier command, /testfor @a[x=-436,y=9,z=-758]
, but instead of testing for a player at those coordinates, it is testing everywhere, and finding me. Any help?
Best Answer
Your command does not work as supplying a x
, y
and z
modifier only changes the location of which the command block detects from.
If you'd like to detect for a player at that location, add the r
(radius) modifier to your selector.
By default, the radius (if one is not specified) is infinite (also called 'none').
You'll want to use:
/testfor @a[x=-436,y=9,z=-758,r=1]
Pictures about "Minecraft TestFor command help"



What replaced the Testfor command in Minecraft?
The /testfor command became obsolete in Minecraft 1.13, and has been replaced by the /execute command*. It will do the same as typing /testfor @e {SelectedItem:{id:"<item>"}} and then putting a comparator to the command block with the command, and then running the command which you wanna run.Minecraft Redstone Tutorial | How to use testfor commands in MCPE!
More answers regarding minecraft TestFor command help
Answer 2
Try to use execute:
execute @a -436 9 758 [command you want to happen]
This command makes a player execute the command you put when they go to the location you entered [-436 9 758].
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: lalesh aldarwish, Pixabay, Pixabay, Rodolfo QuirĂ³s