title: Destroy an object and replace with a prefab at original objects location?
body: <p><a href="https://i.stack.imgur.com/jm4C2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jm4C2.png" alt="enter image description here"></a></p>
  
  <p>The green balls search out for white ones and "infect" them. The white balls are destroyed but they come back at the point of origin. I've tried to make a variable of the position of the white balls but I keep running into "Can't convert Transform to Vector3" errors.</p>
  
  <pre><code>public Rigidbody prefabInfection;
  public Transform infectLocation;
  
  void OnCollisionEnter(Collision colInfo)
  {
      if (colInfo.collider.tag == "Infection")
      {
          Destroy(gameObject);
          Instantiate(prefabInfection);
      }
  }
  </code></pre>
  
  <p>That's the code that's currently being used on collision.</p>
  
  <p>I'm new to Unity also. Should I not destroy the white balls and instead somehow turn them into green balls? Is that possible?</p>
  
  <p>Instantiation seemed like the only way. All I want to do is replace the white "human" balls to green "infection" ones.</p>