Raycast issues with multiplayer & networking.

I am building a multiplayer game for 2 players, I am able to connect to the network, spawn both players at their respective locations and perform actions; However, I am using a raycast to identify a player objects name, and when the server spawns the second player; it creates an exact clone of the first player objects name. This also creates a problem because since players 1 and 2 have the same objects name, stuff (in this case Rotation) happens to MY LOCAL PLAYER, when I tap on the second players object. This should not happen. The only rotation that should happen is when I tap on MY player object.
Here is the code for review. Please help me identify the problem.

 if (Input.GetMouseButtonDown(0))
        {
            Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);

            if (Physics.Raycast(ray, out hit))
            {
            if (hit.transform.name == "PlayerUnit(Clone)") 
                {
                if (hasAuthority == false)
                {
                    return;
                }

                print("TOUCHED WITH NAME:" + hit.transform.name);
                    lastMousePos = Input.mousePosition;
                    touched = true;
                    currentSpeed = 0; //
                }
            }

        }
        if (Input.GetMouseButtonUp(0) && touched == true)
        {
        currentSpeed = 1081;
        }
        else
        {
            if (currentSpeed > rotationSpeedMin )
            {
            touched = false;
            currentSpeed -= acceleration * Time.deltaTime * currentSpeed;
            }
            //transform.Rotate(new Vector3(0, 0, -100) * Time.deltaTime * currentSpeed);
            transform.Rotate(Vector3.forward * Time.deltaTime * currentSpeed);
        }

    }

Turns out the problem was easier to fix than to think. I got the answer from the link below. I was raycasting all objects with the NAME player, WhatI had to do is raycast for collision. “To solve this you have to do a Collider.RayCast() instead of a Physics.RayCast(), so each object’s Update() function will only check if that object’s collider is hit and if so … only moves that particular object.”

Solved.