In that case you will want to check more things, like whether the character is currently falling (airborne) and if they have any inputs higher than 0 (are trying to move themselves instead of being moved by outside forces)
In that case you will want to check more things, like whether the character is currently falling (airborne) and if they have any inputs higher than 0 (are trying to move themselves instead of being moved by outside forces)