double key problem

function Update()
{
if(Input.GetKeyUp(“w”)){
if(Input.GetKey(“w”)){
rigidbody.AddForce(Vector3.Forward*power);
}
}

Input.GetKeyUp returns true if the key was just released.

Input.GetKey returns true if the key is currently down.

I don’t believe it’s possible for both of those states to ever be true.

Try recording the time of the last press of “w”, and if the time between two “w” presses is short enough, then you have a double tap of “w”.