Basically what I did for a sword, was I had when you press the attack button; shows the characters attack sprite, and creates an invisible object that isn't solid, in front of the character, and this object causes damage for any enemy touching it. As soon as the animation is over, I had the damage object delete itself. It worked well for me, I'm sure there is a much more efficient way, but that way is easy and simple.