Need Help Getting My Player To Jump.

I added Photon To My Game And Now My Player Wont Jump, Not Sure What Is Causing this issue.
I had him jumping after but Something happened and I Had To Re import my player Model and start from scratch, I used all of the same code, and even attached a Rigidbody and Capsule collider to the player and I can not for the life of me figure out why when I hit space that the player won’t jump. Maybe someone can steer me in the right direction. Here is all the code involved with making the player jump. I know it’s something simple, Just can’t figure it out. Dnt even kno if it’s something to do with the code.

[Header("Jump Settings")]
public Vector3 jump;
public float jumpForce = 2.0f;
public float floorAngleThreshhold = 15.0f;
public bool IsGrounded = false;

Rigidbody RB;

private void Start()
{

    _animator = GetComponent<Animator>();

    RB = GetComponent<Rigidbody>();

    jump = new Vector3(0.0f, 2.0f, 0.0f);
    

    
}

     private void OnCollisionStay(Collision col)
{
    foreach (ContactPoint hit in col)
    {
        
        if (Vector3.Angle(Vector3.up, hit.normal) <= floorAngleThreshhold)
        {
            IsGrounded = true;
            return;
        }
    }
}

private void OnCollisionExit()
{
    IsGrounded = false; 
}

 private void Jump()
{
    if (IsGrounded)
    {
        if (Input.GetKeyDown(KeyCode.Space) && PlayerStat.StaminaBar.value > 0.3)
        {
            RB.AddForce(jump * jumpForce, ForceMode.Impulse);
            _animator.SetTrigger("IsJumping");
        }
        else
        {
            _animator.SetBool("IsFalling", false);
            _animator.SetBool("Landing", true);
        }
    }
    else
    {
        _animator.SetBool("IsFalling", true);
    }

}

I don’t see the Jump() function being called from anywhere, so there’s no clear time during which your character should jump.

To rectify that, you could use something as simple as:

void Update()
{
	Jump();
}

If you continue to have any trouble after that, there are a few potential issues that could be looked into:

By using ForceMode.Impulse and not multiplying the force by the mass of the Rigidbody, the jump could wind up being weaker than expected if you ever decide to modify the Rigidbody's mass. By extension, it’s not required either, but since you appear to be using a 3D Rigidbody, the jump force could alternatively be applied using ForceMode.VelocityChange to inherently ignore mass (not applicable for Rigidbody2D).

Also, you’re applying something of an out-of-nowhere multiplication to the force of the jump in your Start() function when you set your “jump” variable.

jump = new Vector3(0.0f, 2.0f, 0.0f);

Since that effectively doubles the value of your “jumpForce” variable, it’s really just a bit misleading. It would probably be more convenient for your own sake to set it to Vector3.up or, if you want to counter gravity more directly:

jump = -Physics.gravity.normalized; // default Vector3(0, 1, 0)

With that change made, you’d just need to increase the “jumpForce” value to get back to where it started.