title: Score update. Change in every 5 seconds
body: <p>I'm new to unity and I'm developing a 2d game. I want my game to update the &quot;scoretext&quot; every 5 seconds and I want it to update for +1. But my code is not working. It is updating in like 0.000...1 second (I mean the program doesn't wait 5 seconds to update). How can I fix this? Thanks!</p>
  <pre><code>public Text scoretext;
  public int score;
  
  
  
  IEnumerator scoreup()
      {
          score++;
          scoretext.text = score.ToString();
          yield return new WaitForSeconds(5);
      }
  
  void Update()
      {
          StartCoroutine(&quot;scoreup&quot;);
      }
  </code></pre>