destroy the old prefab instantiated when new one is instantiated destroy old prefab with out destroying newly created prefab.
The code below is what i use to destroy a soldier when his health is 0 and replace him with a ragdoll just put your old GameObject you want to destroy in the dead variable and the GameObject you want to replace it with in the deadNew variable. I hope this helps
`
var MaxHealth : int = 100;
var CurrentHealth : int;
var dead : Transform;
var deadNew: Transform;
function Start () {
CurrentHealth = MaxHealth;
}
function ApplyDamage ( Damage : float ) {
if(CurrentHealth < 0){
return;
}
CurrentHealth -= Damage;
if(CurrentHealth == 0){
dead = Instantiate(deadNewPos, dead.transform.position, dead.transform.rotation);
Destroy(gameObject);
}
}
`