Enable/disable turnscript based on cloned object's attribute. What am I doing wrong?

CheeseMyBaby
05 Oct 2018, 15:03foreach (obj, GetDirectChildren (player.parent)) {
if (HasAttribute(obj, "ehp")) {
obj.attacking = false
}
}
With this code I'm trying to:
Check if an object has the attribute "ehp" (enemy health points).
If it does it's an enemy that's automatically attacking on sight.
I want make the enemy stop attacking ('cause the turnscript is enabled when I'm wearing an enemy uniform)
I'm going slightly mad here.

CheeseMyBaby
05 Oct 2018, 15:20Oh ffs... nevermind. I had another turnscript that did the exact same thing but... you know.... the opposite.