How do I test for players in a specific area on Bedrock Edition?

How do I test for players in a specific area on Bedrock Edition? - Green and White Banana Tree

I'm trying to make an adventure game, and I'm making springs, but I can't seem to get the /testfor command to work. What do I do?



Best Answer

You need to use /execute

/execute @a[x=6,y=3,z=10,dx=1,dy=0,dz=1] ~ ~ ~ effect @s levitation 1 1 true

Within the target selector @a[] you specify the starter coordinates with x=, y=, z=, and then the distance with dx=, dy=, dz=. the dx dy dz is the difference, so if x=10 and dx=5 you test for an area from 10 to 15, and this works the same for the other once as well both for positive numbers and negative.




Pictures about "How do I test for players in a specific area on Bedrock Edition?"

How do I test for players in a specific area on Bedrock Edition? - Student Cheating During an Exam
How do I test for players in a specific area on Bedrock Edition? - Student Getting A+ Mark in Her Exam
How do I test for players in a specific area on Bedrock Edition? - Student Cheating During an Exam



How do you test if a player is in a certain area Minecraft?

2. Type the Command
  • Test if Players are within 10 blocks. In this example, we will test to see if there are any players within a 10 block radius with the following command: /testfor @a[r=10] ...
  • Test if Mooshrooms are within 50 blocks. ...
  • Test if Nearest Player is at Level 20 experience.




  • How to detect if player are standing on *SPECIFIC BLOCKS* in minecraft bedrock




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: cottonbro, RODNAE Productions, RODNAE Productions, RODNAE Productions