NavMeshAgent.isStopped pausing all NPC's

Am I missing something? I have a number of NPC’s I created that all move based on the navmeshagent. I was hoping to have the specific NPC “pause” for a short time when clicked on. Here is a summary of basics I am using to do that.:

        IEnumerator DelayAction(float delayTime)
        {
        //Wait for the specified delay time before continuing.
        yield return new WaitForSeconds(delayTime);
        agent.isStopped = false;
        }

void Start()
    {
        agent = gameObject.GetComponentInChildren<UnityEngine.AI.NavMeshAgent>();
    }

void Update()
    {
if (Input.GetMouseButtonDown(0)) 
    {
        RaycastHit hit;
        Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
         
        if (Physics.Raycast(ray, out hit)) 
        {
            if (hit.transform.tag == "Player" )
            {
                agent.isStopped = true;
                StartCoroutine(DelayAction(3));
            }
        }  
}

that seems to work ok with one exception. It “pauses” all NPC’s. I only want to pause the one that was clicked on. Before I go and write some complex code (changing the target to current location and then setting it back to original target) I thought I would ask it out here.

Yeah, I found my issue. The mouse button routine (this script) is on all of my NPC, thus it triggers on all NPC’s. Since they are all have the same tag, they all pass the if statement and all run the pausing. I have updated the if statement to key on the Instance ID and the world is good again…

            if (hit.transform.GetInstanceID() == gameObject.transform.GetInstanceID())