how do i disable crouching in midair

im made a crouching mechanic using a tutorial but my character is crouching in midair which basicly boost it

Add an IF branch and a variable to check whether you are in the air or not on your crouch logic. similar to this one in my game.

In Addition, make sure you have checks on your jump, and sprint to see if you are crouching.

You could also use Character Movement > is Falling and plug that into a branch instead

Is it for a player or AI?