How do I make this script only apply to the local player

Hi, I’m having trouble making this script apply to only the local player, whenever I move my mouse both players move their heads, everything else works fine,

public class CameraFPC : NetworkBehaviour {
	Vector2 mouselook;
	Vector2 smoothV;
	public float sensitivity = 5.0f;
	public float smoothing = 2.0f;
	public GameObject frickinwork;

	// Use this for initialization
	void Start () {

	// Update is called once per frame
	void Update () {
		if (!isLocalPlayer)//trying to make it ony work for local player
		var md= new Vector2(Input.GetAxisRaw("Mouse X"), Input.GetAxisRaw("Mouse Y"));
		//tracks movement
		md = Vector2.Scale (md, new Vector2 (sensitivity* smoothing, sensitivity * smoothing));
		smoothV.x = Mathf.Lerp(smoothV.x, md.x, 1f / smoothing);
		smoothV.y = Mathf.Lerp (smoothV.y, md.y, 1f / smoothing);
		mouselook += smoothV;
		mouselook.y = Mathf.Clamp (mouselook.y, -90, 90);
		frickinwork.transform.localRotation = Quaternion.AngleAxis (-mouselook.y, Vector3.right);
		transform.localRotation = Quaternion.AngleAxis (mouselook.x, Vector3.up);

I tried to make it only affect the local player by doing

if (!islocalplayer){

thanks for any help!

Try to use hasAuthority instead.