Code works in a game but other game not.

I used a code from my roll a ball game but it doesn’t work?:

private Rigidbody rb;

float moveVertical = Input.GetAxis ("Vertical");
float moveHorizontal = Input.GetAxis ("Horizontal");

Vector3 movement = new Vector3(moveHorizontal, 0.0F, moveVertical);
rb.addForce(movement * speed);

He says the rb.addforce line isnt good?

Solved i forget the getComponent in start.