How to make AI Idle after chasing player

I have problem with my Behavior tree. The Ai keeps following me and I know that I have a missing blackboard state for idle and even if I am now infont on an AI he can still follow me. This is my Blueprint and Behaviour tree.

Kind of depends on how you want your ai to behave. If you want it to stop chasing when he is close enough to the player, just make a distance check and set state to idle when he is close enough. You’ll also want to make rhe moveto task to abort self. Otherwisr it will still finish the moveto task instead of switching to idle immediately.