Character and enemy don't damage each other

Hi everyone,
I am trying to make my character and enemy damage each other but everytime I go to play mode, all they do is play an animation of attacking. How can I make them lose health? And by the way, i have some codes for them losing health but they dont.

You should first make a script with a variable Health. Now you can script it so when the collider of the weapon collides with the enemy/player, or when the animation is played, the health variable is reduced by the damage.