deactivate a script component deactivate the all prefab

using UnityEngine;
using System.Collections;

public class Cursor : MonoBehaviour {

	void Start () 
    {
       gameObject.GetComponent("Slicer").active = false;
	}
	
	void Update () {
        gameObject.transform.position = Camera.main.ScreenToWorldPoint( new Vector3(Input.mousePosition.x, Input.mousePosition.y, 0));

        if (Input.GetMouseButton(0))
        {
            Debug.Log("mouse pressed");
            try
            {
               gameObject.GetComponent("Slicer").active = true;
            }
            catch
            {
                Debug.Log("falied");
            }
        }
        else
        {
            Debug.Log("mouse not pressed");
            try
            {
               gameObject.GetComponent("Slicer").active = false;
            }
            catch
            {
                Debug.Log("falied");
            }
        }
	}
}

i want to acivate a script named “Slicer” attached to the Object only when the left mouse button is pressed, but it keep diactivate the object itself, any ideas why?

Setting active will activate/deactivate the gameObject itself, even if it seems that you’re doing it on a component. Use enabled instead.

 gameObject.GetComponent("Slicer").enabled = false;