roblox-world-24/path_finding_npc.cs

9 lines
233 B
C#
Raw Permalink Normal View History

2024-05-29 05:25:31 -04:00
local waypoints = game.Workspace.Waypoints
local npc = script.Parent:WaitForChild("Humanoid")
while true do
for waypoint = 1, #waypoints:GetChildren() - 1 do
npc:MoveTo(waypoints[waypoint].Position)
npc.MoveToFinished:Wait()
end
end