How to check if a BoxCollider is hit by a trigger?

I searched everywhere I could not find the answer. My problem is that I have a Sword attached to my player. If the sword isn’t a trigger the player “glitches out”. So if the collider of my sword hits a Zombie, it looses health but if trigger is enabled it doesn’t. The script attached to the Zombie checks if there is a collision with “Sword” but it isn’t triggered when the collider of sword is a trigger. Both objects have rigidbodies. So is there a way to check if a BoxCollider (trigger not enabled) is hit by another BoxCollider (trigger enabled) and not the other way around?

Well you should be able to use the OnTriggerEnter() function on the GameObject that has a BoxCollider that isn’t a Trigger.

void OnTriggerEnter(Collider other) {
     // Lose HP
     // Play sound
     // Do whatever you like