need help with my script

i made this scripti dont know whats wrong please help me. if its bad then help me with a new script its a melee script.

var enemyhealth = 100;
var Playerhealth = 100;
var Enemy : Transform;
var Hit : RaycastHit;
function Start ()
{
}

function Update ()
{
  if (collider.Raycast (Enemy, Hit, 100.0))
  {
     if(Input.GetMouseButtonDown(0))
       enemyhealth -= 1;
  }
}

Collider.Raycast takes a Ray, not a Transform, as its first parameter. So you need to construct that Ray. Also, you should probably do the ‘if GetMouseButton’ first. That way you only do the raycast in the one frame the mouse button went down, not on every frame.