Colliders don't register when they are not moving.

So, my player character has a BoxCollider2d, and I’m trying to right code where, when an enemy enters its “view”, it will go into an attack state and send a box cast to find the player’s collider and register a hit. It works, but the caveat is that the player’s box collider doesn’t register unless the character is moving. Is there any reason as to why this happens? The colliders are separate objects as a child of the player character if that helps any.

Ah, well, I see what was wrong and it hit the zombie’s box first before the player’s. That makes sense.