Multiplayer - Host and Client problem with input.

Hello dear community,

I am making a multiplayer game. I am able to connect both the host and the client to the server. Everything works fine except that when I click on my player to perform a rotation action the VS player semi-rotates (it seems that the Versus player gets input from my players input and this shouldn’t happen as the object that moves isn’t my player) The rotation that the Versus player receives is kind of jerky; it does not move entirely like MY players perfect rotation. Is this a bug? am I doing something wrong? Perhaps a bad connection? I have tried everything but I simply cant get rid of it. Any help will be appreciated. Thank you for your time kind ma’am/sirs. My code below. (PLEASE NOTE that the code is attached to a child gameobject. I attached it to this because when I rotate the object I only want that specific child to rotate. I hope this makes sense. Thanks again)

 using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;

public class KeeperKick : NetworkBehaviour
{
    public float rotationSpeedMin = 0;
    public float rotationSpeedMax = 180;
    public float currentSpeed = 0;
    public float acceleration = 1;
    public float power = 500;
    RaycastHit hit;
    public float distance = 6.7f;
    public GameObject target;
    bool touched;
    public void Start()
    {
        touched = false;
    }
    public void Update()
    {
    if (hasAuthority == false)
    {
        if (Input.GetMouseButtonDown(0))
        {
            print("Touch Pressed");
            Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);

            if (Physics.Raycast(ray, out hit))
            {
                if (hit.transform.name == "KeeperBar")
                {
                    print("Touched");
                    touched = true;
                    currentSpeed = 0; 
                }
            }
        }

        if (Input.GetMouseButtonUp(0) && touched == true)
        {
            currentSpeed = 1081;
            touched = false;

            if (currentSpeed > rotationSpeedMax)
            {
                currentSpeed -= acceleration * Time.deltaTime * power;

            }

            transform.Rotate(Vector3.right * Time.deltaTime * power);
        }
        else
        {
            if (currentSpeed > rotationSpeedMin && touched == false)
            {
                //print("less speed");
                currentSpeed -= acceleration * Time.deltaTime * currentSpeed;
            }
            transform.Rotate(Vector3.right * Time.deltaTime * currentSpeed);
        }
        return;
    }
}
void OnMouseDrag()
{
    if (hasAuthority == false)
    {
        if (touched == true)
        {
            Vector3 mousePos = new Vector3(Input.mousePosition.x, 300.2f, distance);
            Vector3 objectPos = Camera.main.ScreenToWorldPoint(mousePos);
            transform.position = objectPos;
        }
        return;
    }
}

}

have you tried using the isLocalPlayer ???