Command block says "get off the grass" if a player is on grass next to it

Command block says "get off the grass" if a player is on grass next to it - Men Running Playing Football during Daytime

I want to make it so when any player comes onto the grass block the command block tells them to get off I think my problem is a misunderstanding of how the syntax works and how command blocks "communicate" with each other enter image description here

The bottom command block: Impulse Unconditional Always active

execute if entity @a[distance=..15] run say "working?"

The top command block: Repeat Conditional Always active

execute as @a if block ~ ~-1 ~ minecraft:grass_block run say "off the grass"





Pictures about "Command block says "get off the grass" if a player is on grass next to it"

Command block says "get off the grass" if a player is on grass next to it - Anonymous soccer player on field during match
Command block says "get off the grass" if a player is on grass next to it - Man Catching Soccer Ball on Field
Command block says "get off the grass" if a player is on grass next to it - Titrist Golf Ball Near Golf Hole





Charborg Streams - MinecraftP: IF I DO ANYTHING, SOMETHING BAD HAPPENS. THIS WILL BE IMPOSSIBLE




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

Images: Pixabay, RF._.studio, Pixabay, tyler hendy