I had the same issues, and here is my solution. I have also added in something else that might be useful to you
In the image below, this sets the jump to be a kind of analog control, so when you press jump for a split second, the player only jumps a small amount. The more you hold jump, the higher his jump arc. Similar to mario or castlevania SOTN (as opposed to the original castlevanias where all jumps were exactly the same height)
then, I set a jump velocity on updateanimation, which I will use to check later if my character is actually rising during a jump, or falling (so I can switch paper2d sprites for a jump cycle)
lastly, this is my logic for jump and double jump. Since I have that Jump Max Hold Time in my construction script, with that alone… the player could double jump and infinite number of times. So, my logic was to to branch out a regular jump (which I allow), and then allow another jump, but only once until he hits the ground again.
hope this helps.