private void OnTriggerEnter(Collider other) { if (other.CompareTag("EnemyAttack")) { civStats.TakeDamage(other.GetComponentInParent <StatsEnemy>().damage); //civStats.currentHP -= other.GetComponentInParent<StatsEnemy>().damage; if (civStats.currentHP <= 0) { //other.GetComponentInParent<EnemyActivity>().target = null; Die(); } } }