Im trying to make it so it limits jumps in my 2d game. But when I play it, It only jumps once then your not able to jump again. Anyhelp? I need a answer fast because this is for the blackthornprod game jam

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerMovement : MonoBehaviour
{
    public float speed;
    public float Jump;

    private float move;
    private Rigidbody2D rb;
    private bool isJumping;

    // Start is called before the first frame update
    void Start()
    {
        rb = GetComponent<Rigidbody2D>();
    }

    // Update is called once per frame
    void Update()
    {
        move = Input.GetAxisRaw("Horizontal");

        rb.velocity = new Vector2(move * speed, rb.velocity.y);
        if (Input.GetButtonDown("Jump") && !isJumping)
         {
            rb.AddForce(new Vector2(rb.velocity.x, Jump));
            isJumping = true;
         }
    }

    void OnCollisionEnter2D(Collision2D other)
    {
        if (other.gameObject.CompareTag("Ground"))
        {
            isJumping = false;
        }
    }

}

@Bunny83 @fafase @Mike 3 @Statement @duck @whydoidoit @robertbu can any of you help me, please?

Your code is fine. You probably forgot to tag your ground as “Ground”.