Ai And Player Health System

So im making an Ai based from a tutorial but when i got into the part where the player have health system and the ai can deplete it and i thought it was good until i try it out to apply it backwards from the player to the ai so the point is the ai can shoot and deplete the players health while the player cant even though i used the same system so am i doing something wrong heres a pic

what im trying to do with the ai health system is try to minus it when its hit by a projectile