void OnTriggerExit(Collider other) { Debris debris = other.transform.parent.GetComponent <Debris>(); if (debris != null) { debrisInArea[debris.GetDebrisIndex()] = false; } }