How can i get an AI to stop following me when I press F?

it doesn’t works
he doesn’t follow me arround