jumping not working

my jumping code here has always worked before on other kinds of objects but for some reason i cant get it working, maybe there is something im missing in this code thats stopping me from jumping?

using UnityEngine;
using System.Collections;

public class thirdpersonmove : MonoBehaviour
{
    private void OnCollisionEnter(Collision col)
    {
        if (col.gameObject.tag == "level") {
            jumpone = false;
            jumptwo = false;
        }
    }
    public float speed = 6.0F;
    public float jumpSpeed;
    public float gravity = 20.0F;
    private Rigidbody rgb;
    private Vector3 moveDirection = Vector3.zero;
    private bool jumpone;
    private bool jumptwo;
    private void Start()
    {
        rgb = gameObject.GetComponent<Rigidbody>();
        jumptwo = false;
        jumpone = false;
    }
    void Update()
    {
        
        CharacterController controller = GetComponent<CharacterController>();
        if (controller.isGrounded)
        {
            moveDirection = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
            moveDirection = transform.TransformDirection(moveDirection);
            moveDirection *= speed;
           
                

        }
        moveDirection.y -= gravity * Time.deltaTime;
        controller.Move(moveDirection * Time.deltaTime);
        if (Input.GetKeyDown(KeyCode.Space))
        {

            if (jumpone == true && jumptwo == false)
            {
                rgb.AddForce(transform.up * jumpSpeed);
                jumptwo = true;
                Debug.Log("jumping");
            }
            if (jumpone == false && jumptwo == false)
            {
                rgb.AddForce(transform.up * jumpSpeed);
                jumpone = true;
                Debug.Log("jumping");
            }
        }
    }

}

@kalsut1 Have you tried changing the values around? It could be that the rigidbody you are using has a higher mass than usual, or that the gravity multiplier is higher than you usually have on the objects where the script has worked before.

You check for the tag “level” in OnCollisionEnter(). Does your environment have this tag set?

Otherwise, your code seems perfectly fine, so if that’s not the issue it is probably a different script or the setup of your player game object that causes the problem.