vary the force value in runtime

Hi, i’m working on a soccer game and i’m trying to achieve a certain functionality. Surely most of us have played fifa and or pro evo. What i’m trying to achieve is how to set a force value depending on how long the shoot button has been pressed. What i’ve achieved is the function of increasing the value as the button is held.

What I want is that when the button is released, the force to be applied is based on the value that has been increasing… Any ideas?

Sorry for this but i’ve found the solution. And just so that anyone who might want the solution i’ll post it

The solution is applyForce().

How it works:
applyForce([x,y,z], bool )
x, y and z are ofcause the axis and the value you put in them determines the force in that direction and the bool is a boolean that if set to True the force will set the accelaration according to the local axis of the object and if set to False the accelaration will be set to the world axis… Thank you for your time and i’m sorry if i wasted it…