First, I'm a noob to the command community. Also, this is what I'm making for a survival series I call Atlantis. I got bored of Minecraft so this is what I'm doing for a solution. The command in theory is supposed to slow me down whenever I touch air.
So the command I am trying is the following:
/execute if block ~ ~2 ~ Minecraft:air as @a run effect give @a Minecraft:slowness 999999 20 true
This does not work. Any ideas?
Edit: Does it matter if it is conditional or unconditional. Same question for command block type.