Get Button and Get Button Up conflict.

Ok, so I don’t know what is going wrong here. The code is pretty basic, but I just don’t know why it doesn’t pick up on the “Up” part. Any ideas?

 function Update()
    {
    	//Check if space is pressed.
    	if(Input.GetButton("Jump")){
    	variable = true;
    	}
    	else if(Input.GetButtonUp("Jump")){
    	variable = false;
    	}
    }

Input.GetButton() will also be true in the same frame that GetButtonUp() is true. Because of the ‘else’ clause, the GetButtonUp() is check is never done. Remove the ‘else’, and this code should work.