That kind of elaborate setup isn’t necessary anymore, with the enhanced input system the ‘Triggered’ pin will fire off repeatedly while the button is held.
When pressed →
You can get the same result you seem to be going for with something like this: