#how can I execute a command if I in a certain height

1 messages · Page 1 of 1 (latest)

remote grove
#

so I want a command to execute only if i in the y 50 to -60, how can I do that?

latent kite
#

You can select players in a box that extends from y=-60 to y=50. Use dx dy dz to make a box that is 110 blocks tall, then move this box to each player's position.

execute as @a at @s if entity @s[y=-60,dy=109] run <command>