raycast hit point is wrong

raycast hit wrong point . this script give to sniper weapon.
raycast does not hit object(add animation)
please help

code↓

#pragma strict

function Start () {
}

function Update () {
    var cam : Transform = Camera.main.transform;
    var ray = new Ray(cam.position, cam.forward);
    var hit : RaycastHit;
    if(Physics.Raycast (ray, hit, 500)) {

        if (Input.GetMouseButtonDown(0) && hit.collider.gameObject.tag == "Enemy") {
 
            print ("enemy!");
            Destroy(hit.collider.gameObject);
       
        }
    }
}

dont spam rays

heck that might be hitting the camera :stuck_out_tongue:

var ray : Ray CamRay;
var raycasthit : Hit;
void Update()
{
if (input.getmousebuttondown(0))
{
 Ray = camera.ViewportPointToRay (Vector3(0.5,0.5,0));
 physics.raycast( Ray, Hit);
 debug.log(Hit.collider.gameobject.tag);
 if(Hit.collider.gameobject.tag == "enemy")
 {
  debug.log("blow that bastard to hell");
  destroy(hit.collider.gameobject.tag);
 }
}

have fun.