Stopping camera

Why this not work? Do i something wrong?

    	private GameObject firstPersonControllerCamera;
    	private GameObject mainCamera;

    	void Update (){
    	    if(enter == true){
    	       if(Input.GetKeyDown("f")){
    	        	TalkingMenu = true;
    				Screen.lockCursor = false;
    		    	firstPersonControllerCamera = gameObject.Find("First Person Controller").GetComponent("MouseLook");
    		    	mainCamera = gameObject.Find("Main Camera").GetComponent("MouseLook");
    			    firstPersonControllerCamera.enabled = false;
    			    mainCamera.enabled = false;
    	       }
    	    }
    	}

It’s make error:
Static member UnityEngine.GameObject.Find(string) cannot be accessed with and instance reference, qualify it with a type name instead

You should use GameObject.Find(“name”). But there are other errors: mainCamera and firstPersonControllerCamera types should be MouseLook, not GameObject. Additionally, you should assign them only once (at Start, for instance) in order to avoid possible hiccups when pressing F (Find functions are slow). Since the First Person Controller prefab has the tag “Player”, is easier and faster to find it by tag. The main camera is easier: the Camera.main variable is a Camera reference that shows which’s the main camera.

        private MouseLook firstPersonControllerCamera;
        private MouseLook mainCamera;

        void Start(){
            // It's easier to find the FPC by its tag:
            GameObject player = GameObject.FindWithTag("Player");
            firstPersonControllerCamera = player.GetComponent< MouseLook>();
            // No need to Find the main camera: use Camera.main instead:
            mainCamera = Camera.main.GetComponent< MouseLook>();
        }

        void Update (){
            if(enter == true){
               if(Input.GetKeyDown("f")){
                   TalkingMenu = true;
                   Screen.lockCursor = false;
                   firstPersonControllerCamera.enabled = false;
                   mainCamera.enabled = false;
               }
            }
        }