title: How do I pause GameObject for a couple of seconds and unpause after a couple of seconds in unity3d
body: <p>I need the <code>gameobject</code> to pause on its own in my scene for 7f or 8f and un-pause at 2f on its own. The script I have is letting my pause by key. Here is my script :</p>
  
  <pre><code>{
  </code></pre>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>sing UnityEngine;
  using System.Collections;
  
  public class star : MonoBehaviour {
  GameObject[] pauseObjects;
  
  
   void Start () {
   pauseObjects = GameObject.FindGameObjectsWithTag("Player");
   }
   
  
  
  void pauseGameobject()
  
  {
  
  if()
  
  {
  
  start coroutine("wait");
  
  }
  
  }
  
  public ienumenator wait()
  
  {
  
  time.timescale = 0;
  
  yield return new waitforsceonds(7);
  
  time.timesale = 1;
  
  }
  void pauseGameobject()
  
  {
  
  if()
  
  {
  
  start coroutine("wait");
  
  }
  
  }
  
  public ienumenator wait()
  
  {
  
  time.timescale = 0;
  
  yield return new waitforsceonds(7);
  
  time.timesale = 1;
  
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>}</p>