title: Timer not running
body: <pre><code>public class PipeSpawner : MonoBehaviour
  {
  
      public float maxTime = 1;
      private float timer = 0;
      public GameObject pipe;
      public float height;
  
      void Update()
      {
          if (timer &gt; maxTime)
          {
              GameObject newpipe = Instantiate(pipe);
              newpipe.transform.position = transform.position + new Vector3(0, Random.Range(-height, height), 0);
              Destroy(newpipe, 15);
              timer = 0;
          }
      }
  }
  </code></pre>
  <p><code>Timer</code> never passes max time, so the code in the update method never executes.</p>