title: NullReferenceException: Object reference not set to an instance of an object _
body: <p>Code:</p>
  
  <pre><code>    if (StoneScript.scoreTex.text != "Pickaxe")
      {
          if(GrassScript.amount &gt;= 3)
          {
              GrassScript.amount = GrassScript.amount - 3;
              GrassScript.scoreText.text = "Wood: " + GrassScript.amount;
              StoneScript.scoreTex.text = "Pickaxe";
          }
      }
  </code></pre>
  
  <p>It works earlier but now won't.</p>
  
  <p>In StoneScript.cs:</p>
  
  <pre><code>public static Text scoreText;
  public static Text scoreTex;
  public static int amount = 0;
  </code></pre>