my 2d character is stucks at fall state

I’am making a 2d platform game , am using enum to make animations happen (run,idle,jump,fall);

my problem is the player is not coming to idle after touching the ground collider if i hold both arrow key and jump(space) key ,he is coming back to idle if i unhold the arrow key ,or by just press jump key without pressing any of arrow keys
below is the flow i have right now, and iam also using istouchinglayers() method to make him play idle animation while on ground after falling
any idea why this will happen? any help is greatly appreciated, thank you.

I believe what is happening is that, because you are holding buttons to make a action happen, your animation script is skipping over the idle enum and setting the animator’s parameter ‘state’ directly to the run or jump enum. Because the animator can only exit the falling animation if ‘state’ is equal to the idle enum, this means that the animator will keep playing the falling animation.

Of course, this is just speculation, as I’d have to see your animation script and the conditions of your animation transitions to know for sure.

Hope this helps!