Detect if the player is at a specific y level

by Hydra   Last Updated June 12, 2019 23:14 PM

I am in 1.14 and I want to check if the player is at a specific Y value.

I tried /execute at @a[y=10] run say hi but for some reason, this will constantly return true no matter what.

I tried /execute at @a[y=10,distance..2] run say hi but this will only work if the player's X and Y values match the command blocks.

How do I detect if the player is at a specific Y value/level?



Related Questions


Updated November 26, 2017 06:14 AM

Updated March 16, 2019 12:14 PM

Updated May 27, 2019 00:14 AM

Updated December 27, 2017 04:14 AM

Updated April 21, 2017 05:14 AM