How to make Ai walk and when it sees your character run towrds you

i am making a project that there is an ai character that walks randomly in the map
when he sees your character he follows you
but i want to make him tun when he follows you
and when he loses you i want him to be walking again

anyone please help!

Hi iI1234Ii!

I think you’re searching for this tutorial:
Hope it helps! Cheers!

Check out my AI examples