Well, if the timeline is not working, then let us just use the tick of that widget.
What this does is, it checks in the tick if we pressed the button or not, if yes, it adds “FillSpeed” to the Percentage of the ProgressBar each second.
Since it is called each tick, we need to multiply “FillSpeed” with DeltaSeconds. Because the Tick does not tick every second. DeltaSeconds compensate this.
Never forget that!
Once the percentage is >= 1.0 (ProgressBar goes from 0.0 to 1.0!), we call a do once (so we only call the function once), set the Percentage to a fixed 1.0,
reset the bool (you don’t need that, but with that the bar automatically decreases again, without the player having to release the button) and call the TakeAll
function. I only put a PrintString there, because i have no TakeAll Function.
On the other side, when the Bool is false, we reset the do once and decrease the Percentage back to 0.0.
You can use 2 different variables for FillSpeed and DecreaseSpeed if you want.
An example for FillSpeed would be 0.5 (like in the screen shot). It adds 0.5 per second, which results in the bar taking 2 seconds to fill.