how to make Enemy AI to spot player position and hit his hand at that position C#

I want to make a Big Monster that spots the player last position and at that last position Monster Hit his Hand at that players last know position. Please Help me with the scripting part tell me how can i do it and please provide me a sample of script C#.
Big Monster just stand and looks if he spots player monster only move his hand and hit his hand at that specific position only and then repeat to spot player.

public enum State
{
Idle,
Attack,
Investigate
}

public GameObject target;

public State state;
private bool alive;

// Variables for Investigate



// Variable for Idle


// Variable for Attack

// Use this for initialization
void Start ()
{
    state = EBasicAI.State.Investigate;

    alive = true;

    StartCoroutine("FSM");
}

// Update is called once per frame
void Update () {
	
}

IEnumerator FSM()
{
    while (alive)
    {
        switch (state)
        {
            case State.Investigate:
                Investigate();
                break;
            case State.Attack:
                Attack();
                break;
        }
        yield return null;
    }
}

void Investigate()
{
    Debug.Log("Investigate");
}

void Attack()
{
    Debug.Log("Attacking");
}

void OnTriggerEnter(Collider coll)
{
    if (coll.tag == "Player")
    {
        state = EBasicAI.State.Attack;
        target = coll.gameObject;
    }
    //else
    //{
       // state = EBasicAI.State.Investigate;
   // }
}

void OnTriggerExit(Collider coll)
{
    if(coll.tag == "Player")
    {
        state = EBasicAI.State.Investigate;
    }
}

I Created the states but how enemy find player last position and Hit his hand to that know position that i want please help me!!

As an Example fo spotting the player:
make a empty Gameobject infornt of the face of the Enemy then in the enemy script reference to this GO and make a Raycast after a LookAt and check if the player is visible

            Vector3 lastPlayerPos;
            RaycastHit hit;
            emptyGo.transform.LookAt(Player.transform);
            if (Physics.Raycast(emptyGo.transform.position,  Vector3.forward, out hit))
            {
                if (hit.transform.tag.Equals("Player"))
                {
                    Debug.Log("Detected the Player");
                    lastPlayerPos =  hit.transform.position;
                }
            }

if you want a max distance it would be:

            Vector3 lastPlayerPos;
            RaycastHit hit;
            emptyGo.transform.LookAt(Player.transform);
            if (Physics.Raycast(emptyGo.transform.position, Vector3.forward, out hit, Distance in float))
            {
                if (hit.transform.tag.Equals("Player"))
                {
                    Debug.Log("Detected the Player");
                    lastPlayerPos =  hit.transform.position;
                }
            }