Code (CSharp): using UnityEngine; using System.Collections; using UnityEngine.Networking; public class NewBehaviourScript2 : NetworkBehaviour { public GameObject shot; void Start() { if (!isLocalPlayer) { Destroy(this); return; } } void FixedUpdate() { RaycastHit hid; Vector3 fwd = transform.TransformDirection(Vector3.forward); if (Physics.Raycast(transform.position, fwd, out hid, 10000.0f)) { if (hid.collider.name == "player" ) { CmdDravHot(hid.point); } } } [Command] public void CmdDravHot(Vector3 h) { RpcDravHot(h); } [ClientRpc] public void RpcDravHot(Vector3 hid) { Instantiate(shot, hid, transform.rotation); } } Help me please.
Perhaps its because your calling an RPC within a COMMAND. Also, trying debugging to see if the variable is whats giving you the issue...what I mean is, data that is set from server to client and back is best using primitive data types. I think this might only apply to syncVars, but maybe its part of the issue. Hope this helps