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;
}
}
↧