I am trying to destroy a gameobject from a script attached to it. what do?
i am checking the remaining hp of a character after they are hit and if their hp is <1 i want to destroy them. the problem is that i dont know how to access the object that holds the script from within it. i cant use find because this script is generic and will be attached to every character. is there a getparent function or something i can use?
thanks for the help!
(btw im working in c#)