How to make enemy AI not be able to damage each other?

The problem is I have a character player that punch kicks and magic. From there I made a child and named that Enemy AI. From there I made a child of Enemy AI and named it Friendly AI. Every thing works except for when ever I play in the level the enemy’s target and damage each other as well as the player character. And the same with the friendly’s. They target and damage each other as well as the the enemy. Both the Enemy and Friendly both have there own controller and own Behavior trees.