Need Help with Paper2D Punch Animation

Hey, I’m just starting my first 2D Platformer project in Unreal Engine and i’m stuck on how to make an accurate punch animation for my player character. I have it so that once I press a button my character’s animation updates and the attack does damage, but the attack is delayed allowing the enemy to easily do damage to me first even when pressing the attack button and in order for the enemy to take damage I have to first run towards the enemy then hold down the attack button and hope I land a hit.