How to reset jumpForce after collision with ceiling trigger. i have it where it zeros out but then i can't jump again.

private void HandleMovement(float horizontal, float vertical)
{
if (MyRigidbody.velocity.y < 0)
{
myAnimator.SetBool(“land”, true);
}
if (!Attack && (OnGround || airControl))
{
MyRigidbody.velocity = new Vector2(horizontal * movementSpeed, MyRigidbody.velocity.y);
}
if (Jump && MyRigidbody.velocity.y == 0 && !OnLadder) //this is jump
{
MyRigidbody.AddForce(new Vector2(0, jumpForce));//MyRigidbody.velocity = Vector2.up * jumpForce;

public void OnTriggerEnter2D(Collider2D other) // public overide void OnTriggerEnter2D(Collider2D other)
{
if (other.tag == “Useable” )
{
useable = other.GetComponent();
}

    if (other.tag == "Ceiling" && Jump && MyRigidbody.velocity.y > 0 && !OnLadder)
    {
        jumpForce = 0;
       

    }
    

    //base.OnTriggerEnter2D(other);
},

if you 0 it out then you will have to reset it again once you are on the ground. What is common instead is to keep jump force constant and then use a bool to track whether the player can jump or not. bool canJump; Although I would like to see the jump code to make sure that approach would work in your code.