how do i use get component in unity 5? the code below is just an example, it's not mine but it's similar and also doesn't work

MouseLook cameraScript;
CharacterMotor controllerScript;
FPSInputController controllerScript2;
CharacterController charControl;
GameObject cam;

 public void Awake()
 {
     cameraScript = GetComponent<MouseLook>();
     controllerScript = GetComponent<CharacterMotor>();
     controllerScript2 = GetComponent<FPSInputController>();
     charControl = GetComponent<CharacterController>();
 }

 public void Start()
 {
     if (photonView.isMine)
     {
         
         cameraScript.enabled = true;
         controllerScript.enabled = true;
         controllerScript2.enabled = true;
         charControl.enabled = true;
     }
     else
     {
         enabled = true;
         cameraScript.enabled = true;
         controllerScript.enabled = true;
         controllerScript2.enabled = true;
         charControl.enabled = true;
     }

It’s already in the standardassets, and using unity.standardassets didn’t work either