UnassignedReferenceException: The variable TheMace of ‘Meleesystem’ has not been assigned.
You probably need to assign the TheMace variable of the Meleesystem script in the inspector.
Meleesystem.Update () (at Assets/scrpits/Meleesystem.js:12)
i dont know what is it telling me ?
#pragma strict
var TheDammage : int = 50;
var Distance : float;
var MaxDistance : float = 1.5;
var TheMace : Transform;
function Update ()
{
if (Input.GetButtonDown(“Fire1”))
{
TheMace.animation.Play(“Attack”);
var hit : RaycastHit;
if (Physics.Raycast (transform.position, transform.TransformDirection(Vector3.forward), hit))
{
Distance = hit.distance;
if (Distance < MaxDistance)
{
hit.transform.SendMessage(“ApplyDammage”, TheDammage, SendMessageOptions.DontRequireReceiver);
}
}
}
}