I'm making a bouncy ball game where you click on the ball to destroy it and get a point. How do I collect only 1 point per ball I destroy? Everytime I click on a ball I get from 2 to 4 points. Thanks for any help.

public class mouseClick : MonoBehaviour

{
void Start () {

}

// Update is called once per frame
void Update () 
{
	if(Input.GetMouseButtonDown(0))
		{
			Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
			RaycastHit hit;
			
		if(Physics.Raycast(ray, out hit, 10f))
			{
				scoreBoard.ballCount++;
				Debug.DrawRay (ray.origin, hit.point);
				Destroy(GameObject.FindWithTag("ball"));
			}
		}
}

}

public class mouseClick : MonoBehaviour 

{
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () 
	{
		if(Input.GetMouseButtonDown(0))
			{
				Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
				RaycastHit hit;
				
			if(Physics.Raycast(ray, out hit, 10f))
				{
					scoreBoard.ballCount++;
					Debug.DrawRay (ray.origin, hit.point);
					Destroy(GameObject.FindWithTag("ball"));
				}
			}
	}
}

public ScoreScript scoreScript;

void Awake()
{
     scoreScipt = scoreScript.GetComponent<ScoreScript>();
}

void OnMouseDown()
{
    scoreScript.Score += 1;
    Destroy(gameObject);
}

void Update()
{
    Print(Score);
}

ScoreScript

[HideInInspector] public int Score;

void Update()
{
    Print(Score);
}

Place scorescript on the camera, and the other one on the bouncing balls. In the inspector for the bouncing balls. Drag the camera object into the variable that is missing the “ScoreScript.” Now everytime you click on a ball, the score will go up and displayed in the console window.