error message

i receive this error message when i try to destroy something.
MissingMethodException: UnityEngine.Transform.TranformDirection
Boo.Lang.Runtime.DynamicDispatching.MethodDispatcherFactory.ProduceExtensionDispatcher ()

var TheDamage : int = 50;

var Distance : float;

var MaxDistance : float = 1.5;

function Update ()

{

if (Input.GetButtonDown("Fire1"))

{

	var hit : RaycastHit;

	if (Physics.Raycast (transform.position, transform.TranformDirection(Vector3.foward), hit))

	{

		Distance = hit.distance;

		if (Distance < MaxDistance)

		{

			hit.transform.SendMessage("ApplyDamage", TheDamage, SendMessageOptions.DontRequireReceiver);

		}
	}
}

}

You are using TranfromDirection. It should be TransformDirection. Simple typo… You can recognize it from the error itself :wink: