Your problem is, that you destroy the parent game object and with it your whole script. So after u have destroyed it, the script doesnt exist anymore. You should just make a parent gameobject with the destroyer script and let the to be destroyed items spawn as children into it. Than call the destroy function for children and not for the parent. Should solve your problem
↧