title: how can i increase a number inside OnTriggerEnter
body: <p>so i'm trying to increase my score every time i hit a wall (IsTrigger) but when i try to increase it, it doesn't work and still 100</p>
  <p>so this is the code im having problem with</p>
  <pre><code>    public Text scoreText;
      public int score = 0;
  
      void Start()
      {
          scoreText.text = score.ToString();
      }
      // Add Some Score To The Text When The Player Hit The CheckPoint
      void OnTriggerEnter(Collider collider)
      {
          if (collider.name == &quot;Player&quot;)
          {
              score += 100;
              scoreText.text = score.ToString();
              Debug.Log(score);
          }
      }
  </code></pre>