#PLZ HELP
1 messages · Page 1 of 1 (latest)
and the code i've written(cant show it on the vid for some reason) is:
void OnTriggerEnter(Collider other) { Destroy(gameObject); Destroy(other.gameObject); }
I believe that it is because you are destroying the gameObject that is running the script Destroy(gameObject); this would stop the next line in the script from running Destroy(other.gameObject); and therefore the other gameObject will not be removed
the code should be
void OnTriggerEnter(Collider other) { Destroy(other.gameObject); Destroy(gameObject); }