the initial jump makes the player not grounded true and the input.jump is true making the DoubleJump Function play without the second jump input. I thought i could use a counter but i run into the same problem. I feel like im close but im missing the logic of it so i need help.
I solved it!
because the initial jump logic was nested inside of the Grounded check. I separated them
In the jump function,
1st if - I checked for a grounded state and set those conditions,
2nd if - i checked for input seeing if the player was grounded or not, running logic based on player state, finally the else condition to reset things when the player was grounded and gravity.