Follow script problem

I’ve got code:

27    var controller = GetComponent();
28    var forward = transform.TransformDirection(Vector3.forward);
29    controller.SimpleMove(forward * movementSpeed);
30    transform.LookAt(target);

and error:

NullReferenceException: Object reference not set to an instance of an object
AI.Update () (at Assets/Scripts/AI.cs:29)

What’s wrong with the code?

You’re not Getting any component. You need to specify what you want in the brackets.