How to i add melee animation to Blueprint?

Hi there,

I have a issue with getting my attack animation right when i press the input button. I have tried many options but nothing seems to work. But i’am stuck on this for days…

I added pics of what my blueprint looks like.

My question is how do i implement my attack animation, so that when i press the shift/input button the character stands still and does the attack animation, (animation continues even if button is released) and when the animation is finished goes to idle or run/jump according to which button is pressed?

Thanks in advance.

Untitled 3 shows the animation i need to add to my blueprint.

second image shows a solution i tried with adding a attack variable. It worked but not the way it should: Attack animation fired as soon as i play the game, continues even if another button is press but if another button is pressed the second time the attack animation stops and idle, run and jump work plays normally again.