disable/enable mouselook not working?

Hey, I have the MouseLook script attached to my player and I’m trying to disable it using the following:

GetComponent(MouseLook).enabled = false;

You’re trying to use the javascript syntax in c#

What you need to do is use the generic version:

GetComponent<MouseLook>().enabled = false

The alternative is to use the type version (which you shouldn’t really do, use the above):

((MouseLook)GetComponent(typeof(MouseLook))).enabled = false;