I am practicing with creating a 2D-Game and I write the C#-script code but my character can't jump.
I try to replace "Space" with "UpArrow" that also didn't work.
if (Input.GetKey(KeyCode.UpArrow) && onGround)
{
rb.velocity = new Vector2(rb.velocity.x, jumppower);
}
Nothing Happen. Character can'r move Right and Left but not jump.