Minecraft testfor not me

minecraft-java-edition

I tried to make the testfor command in Minecraft to test for a player that is not me in a radius of 10 blocks, but when I did /testfor @p[r=10,!name=KeithAwesome2] it didn't work.

Please help me!

Best Answer

Use /testfor @p[r=10,name=!KeithAwesome2], You just had the syntax a little bit wrong.