title: Why did I got a error and what did I do wrong on ping?
body: <p>after watching this <a href="https://www.youtube.com/watch?v=uE2RJAyVaHE&amp;list=PLDj6B2jXbus1v9zD_IdPnGcim3uwSDELI&amp;index=4" rel="nofollow noreferrer">https://www.youtube.com/watch?v=uE2RJAyVaHE&amp;list=PLDj6B2jXbus1v9zD_IdPnGcim3uwSDELI&amp;index=4</a>
  and I did what is said, I got this error
  NullReferenceException: Object reference not set to an instance of an object</p>
  <p>this is the scoreboard code</p>
  <pre><code>using System.Collections.Generic;
  using UnityEngine;
  using UnityEngine.UI;
  
  public class Count_Score : MonoBehaviour
  {
      public Text ScoreBoard;
      public GameObject ball;
  
      private int Bat_1_Score = 0;
      private int Bat_2_Score = 0;
  
      // Start is called before the first frame update
      void Start()
      {
          ball = GameObject.Find(&quot;Ball&quot;);
      }
  
      // Update is called once per frame
      void Update()
      {
          if (ball.transform.position.x &gt;= 35f)
          {
              Bat_1_Score++;
          }
          if (ball.transform.position.x &lt;= -35f)
          {
              Bat_2_Score++;
          }
  
          ScoreBoard.text = Bat_1_Score.ToString() + &quot; - &quot; + Bat_2_Score.ToString();
  
          print(Bat_1_Score + &quot; , &quot; + Bat_2_Score);
      } 
  </code></pre>
  <p>can you tell me what I did wrong?</p>