My jumping only works sometimes

Please use code tags: Using code tags properly

Don’t check for edge-trigger Up or Down type events in FixedUpdate().

Instead, check for Up/Down events in Update() and set a boolean, then “consume” that boolean in FixedUpdate() and clear it back out.

Here’s specifically why checking in FixedUpdate() fails: