[uNET] Instantiated gameobjects not syncing for new clients

Hello!

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

public class Weapons : NetworkBehaviour {

    public bool rif = true;
    public GameObject rifleprefab;
    private GameObject rifl;
    public GameObject rightHand;
    [SyncVar]
    public bool haswep = false;
    [SyncVar]
    public GameObject weapon;
    [SyncVar (hook = "OnWeapon")] public NetworkIdentity hasRifle;

	// Use this for initialization
	void Start () {
	    if(isLocalPlayer)
        {
            ClientScene.RegisterPrefab(rifleprefab);
            ClientSpawn();
        }
	}

    [Client]
    void ClientSpawn()
    {
        if (isLocalPlayer)
        {
            if (!haswep)
            {
                CmdSpawnRifle(transform.position, transform.rotation, rightHand);
                haswep = true;
            }
        }
    }

    void OnWeapon(NetworkIdentity hasweapon)
    {
        weapon.transform.SetParent(rightHand.transform);
        weapon.transform.localPosition = new Vector3(0.0896f, -0.0204f, 0.0275f);
        weapon.transform.localRotation = Quaternion.Euler(-29.4f, 111.3f, 86.617f);

    }

    [Command]
    public void CmdSpawnRifle(Vector3 p, Quaternion r, GameObject g)
    {

        GameObject rifle = Instantiate(rifleprefab, rightHand.transform.position, transform.rotation) as GameObject;
        NetworkServer.SpawnWithClientAuthority(rifle, base.connectionToClient);
        weapon = rifle;
        hasRifle = gameObject.GetComponent<NetworkIdentity>();
    }


    public void Fire()
    {
      
    }
}

With this code, when a new player connects, it actually spawns the gameobject for himself and for other players, but the gameobject isn’t parented (so it just floats there). Whereas, for the already connected clients, it works perfectly.
If the other clients respawns, it will work.

I don’t know at all how I should correct that, there might be something wrong in my code. Any idea how to fix it please?

http://stackoverflow.com/questions/31359668/unity-5-1-networking-spawn-an-object-as-a-child-for-the-host-and-all-clients

The last code helped me, thanks everybody!