Hello, I am using SimplePath and in my code I am trying to make this NPC patrol, go to every point in the map, at least going everywhere. And then repeating itself. Essentially searching the area.
I have gone through mutliple attempts at trying to do this and I would like some help.
function Enemies.Patrol(NPC, PointsTable)
local Config = NPC:WaitForChild("EnemyConfig")
if Config.IsAlerted.Value == false then
local RandomPoint = PointsTable[math.random(1, #PointsTable)]
local Path = Enemies.Move(NPC, RandomPoint, PointsTable)
Path:Run(RandomPoint)
end
end