So I have my main object which I want to shoot and kill. My detection is working great and all but when I spawn the dead/broken version of that object the original object remains (dead object does spawn correctly) but from what I can tell is it’s script simply got destroyed.
function buildDeath() {
var tst = Instantiate(deadMe,transform.position,new Quaternion());
DestroyObject(this);
}
Now I’m assuming that “this” on my destroy object is referring to the gameobject running the script and not the script itself. If I’m wrong then how do I target the gameobject.
Thanks,
Ron