My jumping not work

It seems my jump script worked but why still can’t jump over it, some object.- YouTube

private bool canJump;

void FixedUpdate () {
if(canJump) {
canJump = false;
rb.addForce(0, forceConst, 0, ForceMode.Impulse);
}
}
void Update() {
if(Input.GetMouseButtonDown(0)){
canJump = true;
}
}
// I don’t know would that help

or maybe this, I can’t tell i just messed up some part of this script. So did you want to tell me when i have make mistake.

Hi! Here is very simple JUMP:

Write before void start:
(so you can change value later without touching code)

public float upForce = 1000f;

Then write this in void FixedUpdate:

void FixedUpdate()
{
if (Input.GetKey(“space”)) // If the player is pressing the “space” key player will move up.
{
// Add a jump force
rb.AddForce(0, upForce * Time.deltaTime, 0);
}

}

Ofcourse in your scenario also attach the animation to jump key,
and you should change the space key input in code to your mouse click jump.

Hope it’s helpful for some1.

Thanks.