NPC path finding

well im pretty much new to lua scripting in gmod and don’t have much of a clue on how to think of my own scripts. at this point its just basically copy and paste from gmod wiki and then play around a little with the script and tweak. just felt i needed to point out my naivety on the matter before i asked the question. ive been having difficulty finding any info on this subject but there has to be some kind of script or method for it… i was wondering about improvising the the way npcs move with their paths and directions. what im trying to do is funnel npcs around and into one of two entrances of this small base i made within gmod. zombies to be particular… the zombies are spawned around the base, they notice me inside the base, shamble their way to the wall of the base, notice something is obstructing their path, and then they just walk away from the base towards the direction they came from. is there anyone that knows were to start with this kind of thing? im kind of lost. thanks.

You could start by looking at the AI Schedule and AI Task Libraries. However, if you’re new to Lua, I’d suggest starting with something a little less complex.

appreciate the help.