Animator: Transition issues (in air animation) 2D platformer

I’m trying to make it so when the player is in the air, he transitions to an air animation. He detects when he’s on the ground with a Boolean. I also have another transition set that switches between idle and walking while on the ground. The conditions for switching between the two is that he is moving (Boolean) and that he is grounded (screenshot below), and the condition for switching between the in-air animation and a ground animation is if “grounded” is false or true.


What happens in-game is that when the character is falling initially (spawns in the air), he does the air animation just fine, however after that when I’m in the air after having been on the ground, the Idle animation takes priority even though grounded is not true, and he ends up doing the Idle animation whenever he’s in the air.
I’m not sure if I’ve provided enough information, but if anyone can help then that would be great.

Solved the problem, I had the “grounded” variable in my code working just fine, but I didn’t make it so the animator variable for “grounded” would change according to how it is in the code.
anim.SetBool(“Grounded”, grounded);