[Android] Why does my enemy die no matter where I am in the 3D environment?

Hello peeps, Im kind of new to Unity3D, but a few years ago I was making an FPS for a college project and now I have returned to make an FPS game for Android.

Anyways, I was following a tutorial by Brackeys on Youtube and I wanted to make a separate button for the Melee combat. I created the enemy and then a button and applied the script to the button, the button works fine to play the combat animation, but wherever I move in the map, and looking no where near the enemy, it still manages to kill it?

Im very new to Java script, but getting the hang. Thanks :)

Heres the button script

pragma strict

var TheWeapon : Transform;
var TheDamage : int = 50;
var Distance : float;
var MaxDistance : float = 1.5;

function Update () 
{		
		if(Input.touchCount > 0 )
		{
 
			for(var i : int = 0; i < Input.touchCount; i++)
			{
 
				var touch : Touch = Input.GetTouch(i);
 
				if(touch.phase == TouchPhase.Began &&
				guiTexture.HitTest(touch.position))
				{
					//Attack animation
					
					TheWeapon.animation.Play("Attack");
					//Attack Function
					
					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);
								}
						}
				}
				if (TheWeapon.animation.isPlaying == false)
					{
						TheWeapon.animation.CrossFade("Idle");
					}
 
			}
		}
}

Ah wait, I’ve done it guys :P, turns out I needed a GUI script with Rect LOL, got the new updated one here, basically it shows my texture where my button is on the script and when I hit it, the ray shoots where im looking, took a while but I got there.

Appreciate the help, thanks!

var ButtonTexture : Texture ;
var TheWeapon : Transform;
var TheDamage = 100;


function Update()
{
	var hit : RaycastHit;
	var ray : Ray = Camera.main.ScreenPointToRay(Vector3(Screen.width*0.5, Screen.height*0.5, 0));
	
	//Touches + Co-ordinates Of button placement via (Rect)
	for(var i: int = 0;i < Input.touchCount; i++)
	{
    	var touch : Touch = Input.GetTouch(i);
    	if(Rect(0, 135, 100, 55).Contains(touch.position) && touch.phase == TouchPhase.Began)
    		{
      			 print("Does it work yet?");
  				//My Animation
       			TheWeapon.animation.Play("Attack");
       			if (Physics.Raycast (ray, hit, 100))
					{
						hit.transform.SendMessage("ApplyDamage", TheDamage, SendMessageOptions.DontRequireReceiver);
					}
    		}
	}	
	if (TheWeapon.animation.isPlaying == false)
					{
						TheWeapon.animation.CrossFade("Idle");
					}
}
 //GUI texture with Co-ordinates
function OnGUI(){GUI.DrawTexture(Rect(0,135,100,55),ButtonTexture );}