Player does not Jump Issue(Unity3D)

This is my first character control script.

the cube should be able to jump (failed)

I want to make the cube jump but it just sticks to the ground. When gravity is turn on it jump but does not move forward and when gravity is turn off it moves forward but when pressed Jump it does not come down continuously move up.

 void FixedUpdate ()
	{

		Vector3 vel = rigidbody.velocity;
		vel.x = Input.GetAxisRaw("Horizontal") * MaxHorSpeed;

		if (Input.GetKeyDown(KeyCode.Space) && IsGrounded()){
			vel.y = jumpSpeed;

		}
 }

Your player might not move because of surface friction.

Try to use the following code snippet to move your character:

var movement = Vector3.forward * movementFactor * Time.deltaTime;
var desiredPosition = gameObject.position + movement;

rigidBody.MovePosition(desiredPosition);

I also would suggest to use some lerping to smooth the start end end of movement motion.