[Command] giving error: Trying to send command for object without authority

So I’m trying have my server change some bools specific to my player controller, and I’m pretty sure the code works, but I think something is wrong with my components. My player prefab network identity doesn’t fix it when I uncheck local player authority. The bools effect the mesh renderer of my playercontroller and children of my player controller prefab(two cameras, and a mesh renderer)

Here’s the full error:

Trying to send command for object without authority.
UnityEngine.Networking.NetworkBehaviour:SendCommandInternal(NetworkWriter, Int32, String)
PlayerController:CallCmdJoinRedTeam()
UnityEngine.EventSystems.EventSystem:Update()

Here are the voids:

[Command]
public void CmdEnterSpectateMode()
{
        PlayerCameraEnabled = false;
        PlayerIsVisible = false;
        GravityEnabled = false;
        PlayerBody = GameObject.Find("PlayerController(Clone)");
        PlayerBody.transform.position = new Vector3(500, 30, 675);
}
[Command]
public void CmdJoinRedTeam()
{
        PlayerCameraEnabled = true;
        PlayerIsVisible = true;
        GravityEnabled = true;
        PlayerBody = GameObject.Find("PlayerController(Clone)");
        PlayerBody.transform.position = new Vector3(617, 10, 500);
        PlayerBody.transform.localRotation = Quaternion.Euler(0, -90, 0);
}
[Command]
public void CmdJoinBlueTeam()
{
        PlayerCameraEnabled = true;
        PlayerIsVisible = true;
        GravityEnabled = true;
        PlayerBody = GameObject.Find("PlayerController(Clone)");
        PlayerBody.transform.position = new Vector3(383, 10, 500);
        PlayerBody.transform.localRotation = Quaternion.Euler(0, 90, 0);
}

Does anyone know how I can fix this? Thanks in advance.

It does not matter if LocalPlayerAuthority is checked or not. You can only call commands on player objects. So, if you want to call a command, the component has to be attached to the root of the player.

To check if you are OK on the client side, do Debug.Log(isLocalPlayer). If it returns false, then it is not your player. If you are writing a customized NetworkManager, you could be not giving the authority to the player.