How to make Parent object's script ignore trigger component on children

To immerse yourself into how I want to make it, I’m having Character controller GameObject which has trigger component which used to detect stuff such as ladder and so on, and there’s also children GameObject attached, with it’s own script which acts as “HitZone” to check if attack has hit any enemy in front of it. But, OnTriggerEnter2D function inside parent’s script also reacts to Children’s trigger component.

Any solution or workaround is welcome.

Just place them on different layers and setup the collision matrix.