Can you make a blueprint that will make a character do an animation when you press the spacebar and do another animation when you hold the same key?

I’d like to do a mechanics same with dark souls where you use the same button to do different actions. E.g. the space bar will make characters do a dodge/roll when pressed and will make the character sprint when on hold. Would someone please help. I don’t know much when it comes to blueprints so this would be a great help.

You can branch on release button depending on how long the button has been down. For that you start your timer on pressed (through opening gate on pressed and closing on release and counting on event tick, see pic.) and branch on released.

(Event tick in your case)

I made a temporary blueprint for the dodge. Can you please show me what I need to fix/change in my blueprint.

Here are the pics.

Sorry bout the other pic beside it. Hahaha.
Thanks in advance

Basically you should do all the changes in animations through your animation blueprint, you can find tutorials about it on youtube. And in your character blueprint you just switch variables in the right moment.
And for the pressing and holding a button question - see my original answer.

Thanks Bro.

You’re welcome! Please mark the question resolved, it would be easier for other people searching to find the answer.