LineCast detection not working (to "see" target)

So I want an NPC script that is able to see if a player is visible and then chase it. Normally this is not a problem, i have done similar things while testing in different scripts and stuff, but for some reason this will not work. I originally tried using the CanSeeTarget() boolean function from the FPS tutorial (which i got to work on other scripts before) but that didnt work, i then switched to this:

var Target: Transform;
function Update ()
{
var hit : RaycastHit;
Physics.Linecast (transform.position, Target.position, hit);
if(hit.transform.tag == "Player"){
print("See");
}
}

I will be able to make all the other parts but for some reason this just wont work, the player has the tag Player on it, everything is set up right i believe, i just cant figure it out for the life of me... also here is the script with CanSeeTarget:

var Target: Transform;
function Update ()
{
if(CanSeeTarget()){
print("See");
}
}

function CanSeeTarget () : boolean {

    var hit : RaycastHit;
    if (Physics.Linecast (transform.position, Target.position, hit))
        return hit.transform == Target;

    return false;
}

neither work, please supply an answer?

Try putting Debug.Log(hit.collider.name); in your Update() function to determine what the linecast is hitting.

It's likely to be hitting the collider of your NPC (the one it's being cast from). You'll need to set your NPC's layer to IgnoreRaycast or look at Layermasks to selectively ignore certain layers.