Behaviour, melee attack when in range

Do you know how to set a reference of the player to the blackboard as an object. From that point it is easy.
The Move to task has a value you can tweak of how close the controlled AI must be in order to have completed the move to task in CM.
You can attack at that point. You can play the animations right from the behaviour tree it is easy, but I did not have good blending and control with that approach.

For my last project, I move him to about 150 CM away.
And then I have the Behaviour Tree execute a custom BTTask which just sets the value a BOOL ‘isAttacking’ to true in the AI’s main blueprint.
This is picked up by the anim blueprint where you can blend and control the attack in much better.