Applying a play rate modifier during an animation

I am trying to make a character controller that has variable attack speed for melee weapons based on mouse movement. Currently it tracks my mouse movements and gives me an attack speed modifier based on the amount moved. The problem is right now its tracking it constantly, I want a way to only track the mouse movement for a moment after the attack key is pressed, and then stop.

I tried making custom events for tracking mouse movement and then using a set timer by function name to stop it, but i missed something. this is the blueprint with those additions, i’ve tried a bunch of different configs with those nodes, but cant get it.

I think the inputaxis camera turn and look are overriding any other custom event. I am fairly green still with UE so I used chatgpt to help but i’ve hit a wall, any help is appreciated, thanks!