Hi,
Why is this spitting a null reference at me?
Any help is greatly appreciated!
var team : String = "blue";
function Update ()
{
var hit : RaycastHit;
if (Physics.Raycast (transform.position, Vector3.forward, 2))
{
hit.collider.SendMessage("Capture", team, SendMessageOptions.DontRequireReceiver);
}
}
Thanks, got it working.
– Myth