void OnTriggerEnter(Collider other) { if (other.name == "Player" && isTracking) { Debug.Log("Player detected --- ATTACK!"); agent.destination = player.position; if (gameManager.isTickingDamage) { gameManager.damage = true; Debug.Log("Player taking damage"); gameManager.InvokeRepeating("damageT", 0.1f, 0.5f); } else { Debug.Log("Player is Immune to my attack!"); } } }