Disable first person controller script

OK, I have searched everywhere on the web. Does anyone actually have an answer as to how to disable the first person controller script? I have tried everything and nothing works.

GameObject.FindGameObjectWithTag(“Player”).GetComponent().enabled = false;

you think would work but doesn’t. I have tried every other option. using unity first person etc says not needed anymore and Visual Studio grays out. Even if I leave in, still nothing. This is ridiculous. Should be a simple fix but, even though some say thanks working now to the answers, nothing works for me. I am using latest Unity. 5.5 I think. All I want to do is disable the player when inventory opened and show the mouse for interactions. I could use help please on both topics before I break my keyboard. :slight_smile:

I get the error… NullReferenceException: Object reference not set to an instance of an object. The FPS Controller is obviously there and so is the script? It is built into the standard first person controller. I am able to disable the character controller but, I want the whole thing disabled until the inventory is closed. SetActive for the FPS Controller is not the answer because it disables the camera, mouse etc. I just want to stop mouselook and movement which are part of the firstpersoncontroller script. I am using Using C# Thanks to anyone who could help. I know this ha been asked before a billion times and I have read them all but, regardless. I get the same thing.

In FirstPersonController.cs, try doing

GameObject.Find ("FPSController").GetComponent<FirstPersonController> ().enabled = false;

Did you ever figure this out? I’m getting this exact same problem