How to keep ball from jumping more than once?

I am trying to make a ball jump as it is rolling but when it is rolling, the isGrounded bool keeps flashing on and off. Why and how do I fix it? I would appreciate any help at all.

C# preffered.

public class Jump : MonoBehaviour
{

public float jumpForce = 10.0f;
public bool isGrounded;
public Collider groundCollider;
float jumpWaitTime = 1.0f;
private float nextJumpTime;


// Use this for initialization
void Start ()
{
	
isGrounded = true;
}
//performs a jump 
public void JumpFunction() 
{

   Vector3 jump = new Vector3(0.0f, jumpForce, 0.0f);
   rigidbody.AddForce(jump, ForceMode.Impulse);
}

// Update is called once per frame
void Update () 
{
	 if (Physics.Raycast(transform.position, -transform.up, 2)) 
   {
     isGrounded = true;
   } 
else 
   {
     isGrounded = false;
   }
//jump if player presses Jump
   if(Input.GetButtonDown("Jump") && isGrounded && Time.time >= nextJumpTime)
	{
		isGrounded = false;
      JumpFunction();
		 nextJumpTime = Time.time + jumpWaitTime;
   }
	// manually set isGrounded to true
	if(Input.GetKeyDown(KeyCode.U))
	{
		isGrounded = true;
	}
	

}

void FixedUpdate ()
{
	
}
void onCollisionStay(Collider groundCollider)
{
	
	isGrounded = true;
	
}

}

@ c====3
Yo bro, I got it. Although I used movement only for horizontal axis… :slight_smile:

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

public class BallControl : MonoBehaviour {

public float speed;
public int jumpHeight = 8;
private bool isfalling = false;
private Rigidbody rb;

void Start()
{
    rb = GetComponent<Rigidbody>();
    isfalling = false;
}

void FixedUpdate()
{

    float moveHorizontal = Input.GetAxis("Horizontal");

    Vector3 movement = new Vector3(moveHorizontal, 0.0f, 0.0f);

    rb.AddForce(movement * speed);

    if (Input.GetKeyDown(KeyCode.W) && isfalling == false)
    {
        rb.AddForce(new Vector3(0, jumpHeight, 0), ForceMode.Impulse);
       
    }
    isfalling = true;

}

   void OnCollisionStay(Collision groundcollider)
{
    isfalling = false;
}

}