Light raycast to enemy

I am developing an indie horror video game as a spin-off to Slender: The Arrival. In the game, the main antagonist (named the Chaser) is very sensitive to light. Which allows the player to temporarily stun her with their flashlight. How can I recreate this in Unity 5 and C#? Here’s the code that I have already

public class BlindChaser : MonoBehaviour
{
public Transform Player; //The character the person playing controls in-game.
public NavMeshAgent Chaser; //The main antagonist of the game.
public Vector3 ChaserDistance; //The Chaser's distance away from the Player.
}
void Update()
{
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
            RaycastHit hit;
            if (Physics.Raycast(ray, out hit))
            {
                if (hit.collider.CompareTag("Chaser"))
{
bool ChaserFound = false;

}
if(hit.collider.gameObject("Chaser"));
{
Debug.DrawRay(transform.position, ChaserDistance * 30, Color red);
ChaserFound = true;
GetComponent<Animation>().Play("stun");
}

Is this code right. If not, what can I do to improve it to resemble when the player does this in Slender: The Arrival? If you don’t know what I’m talking about, please watch the following video:

HI have you found out how to do it?

It’s actually just a simple raycast between the enemy and the player. If the light hits the enemy’s GameObject, stop the enemy’s NavMeshAgent (or whatever AI you’re using) and play an animation.