void OnTriggerEnter(Collider other) { MainCharacter character = other.GetComponent <MainCharacter>(); //TurrelRotation turrel = other.GetComponent<TurrelRotation>(); if (character != null) { character.ChangeHealth(-damage); } Destroy(gameObject); }