I am trying to add an instant kill script to an object through a child but I cant find the function that allows me to do it. I have tried giving the parent the script and using 'gameObject.enabled = false;' but it doesnt seem to work. There in an AddComponent function but it adds a component to the child. Any ideas?
↧