Mouselook enabled on Rightmouse hold down

Hi there, i have a problem with this script, im only a beginner, i found this script in a comment but it doesn't work for me. I get unexpected symbol error for "else" altho i have tho clue what im doing wrong so here goes:

Public class Mouselook: MonoBehaviour {

// Use this for initialization
void Start () {


// Update is called once per frame
void Update () {
       GetComponent(Mouselook).enabled = true;
       GetComponent(Mouselook).enabled = false;


Thank you in Advance

When you set enabled = false, you are disabling the script for good, so it will never ever get another Update call.

You either need to make this a separate script, or edit your Mouselook logic to just do an early return if the button is down.