bar reset problem does not continue

I’m setting up a bar system. When I press the “E” key, the bar fills up, and when I release it, it clears. I don’t want it to clear; I want the bar to continue from where it left off. How can I solve this problem?