When i use set fire1 to lose enemy health, doesnt lose any enemy health. Not sure if its binded to left click or not

Im watching brackeys tutorial for survival game and i set fire1 to do all this and that with a left clicking the mouse but it will not do anything. I am not sure if its binded to left click on mouse, i did go to the settings and it said left ctrl but i dont understand the settings. Yes im am new to Unity and programming. If you want the code for my enemy just ask. This is in java btw.

HERE IS MY CODE


#pragma strict

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

Hello,

You should set fire1 to mouse 0 in your input settings, or, you can replace your if statement by OnMouseClick() function.