private void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag("Pick Up")) { other.gameObject.SetActive(false); TankHealth targetHealth = gameObject.GetComponent <TankHealth> (); targetHealth.AddHealth(); } if (other.gameObject.CompareTag("Pick Down")) { other.gameObject.SetActive(false); TankHealth targetHealth = gameObject.GetComponent <TankHealth> (); targetHealth.SubHealth(); } }