Hold and release at the right time

hi need help how to do the mechanics of this so that when the widget is on the screen, you have to hold down a button and release it at the right moment, that is on the green field

Use a slider for the thing that marks the current spot on the bar. Use a timeline to set the value of the slider.