From 125d8a9aa216f4464d28b78c5e752b5c1d9f2854 Mon Sep 17 00:00:00 2001 From: Elvis Tony Date: Wed, 29 May 2024 10:25:31 +0100 Subject: [PATCH] Create path_finding_npc.cs --- path_finding_npc.cs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 path_finding_npc.cs diff --git a/path_finding_npc.cs b/path_finding_npc.cs new file mode 100644 index 0000000..e5c7671 --- /dev/null +++ b/path_finding_npc.cs @@ -0,0 +1,8 @@ +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