So I spawn players and than guns that they have, on a host it works perfectly but on a client guns do not become instance of an object. Here's the code
[Command]
void CmdSpawn() {
gun = (GameObject)Instantiate(gunToEquip, weaponPosition.position, weaponPosition.rotation);
NetworkServer.SpawnWithClientAuthority(gun, connectionToClient);
gun.transform.parent = weaponPosition;
}