Object reference error

“NullReferenceException: Object reference not set to an instance of an object
ClawMeleeScript.Update ()…”

I’m following a video tutorial series and idk how to get rid of this error.
(UPDATE: the error is located on line 17)

Current script:

#pragma strict

var Damage : 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.TransformDirection(Vector3.forward), hit));
		{
			Distance = hit.distance;
			if (Distance < MaxDistance)
			{
			hit.transform.SendMessage("ApplyDamage", Damage, SendMessageOptions.DontRequireReceiver);
			}
		}
	}
}

Check your hit.transform, maybe you not have a transform in your hit.

Change this and see what you got :

if (Distance < MaxDistance)
{
   hit.transform.SendMessage("ApplyDamage", Damage, SendMessageOptions.DontRequireReceiver);
}

for this :

if (Distance < MaxDistance)
{
   Debug.Log( hit, Damage,  hit.transform.name);
}

If the problem is your hit, you can do this :

if (Distance < MaxDistance)
{
   if( hit.transform )
       hit.transform.SendMessage("ApplyDamage", Damage, SendMessageOptions.DontRequireReceiver);
}