GetComponent Help

using UnityEngine;
using System.Collections;

public class PowerUp : MonoBehaviour {

FirstPersonController firstPersonController;

void Start () {

	firstPersonController= gameObject.GetComponent<FirstPersonController>();
}


// Update is called once per frame
void Update () {

	firstPersonController.movementSpeed = 0;

}

}

I am trying to access the movementSpeed variable from the FirstPersonController script. I am getting a null reference error.

firstPersonController.movementSpeed = 0;

above variable should be public static if you are calling directly with component name
otherwise if you want to call it from GameObject.Find(“name”).GetComponent().movementSpeed = 0;
this is also should be public variable