I am very confused to why my code wont work, I have googled for hours and have been unable to find anything. I am wanting a message to be sent to a box which gets destroyed for all players on the network.
GUN SCRIPT
PUN RPC and Javascript
GUN SCRIPT
Code (JavaScript):
- function Update(){
- if(Input.GetMouseButton(0)){
- var hit : RaycastHit;
- var fwd : Vector3 = transform.TransformDirection(Vector3.back);
- Debug.DrawRay(transform.position, fwd, Color.green);...