How to stop enemy running anim?

Hello,

So i finaly was able to make the enemy run at my character, but now it wont stop running. i added a line of code that i thought should make it stop running.

I have made a circle around the enemy where it is able to see the character and will start to go after it. but when it is no longer able to see my character it is just running in place.

This is the code i made, its under void update

 if (distance <= LookRadius)
        {
            agent.SetDestination(target.position);
            anim.SetBool("IsRunning", true);
           
        }

        if ( distance <= agent.stoppingDistance)
        {
            FaceTarget();
        }

        if (distance == LookRadius)
        {
            anim.SetBool("IsRunning", false);
        }

I realy hope you can help me

did you make a transition inside the animator for when the IsRunning boolean is false?