Making damage events only play when attacking

Hi, at the moment the players weapon will deal damage every time the socketed weapon begins overlapping an enemy, how would i get it so that damage is only applied when the player inputs the attack or a certain animation plays?