Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a Pathfinding Script for a Zombie?

Asked by 7 years ago

Hello, for my game, I want a zombie to move to a specific place but I don't know how to do this script? Thx

-PhantomGuy778

1 answer

Log in to vote
1
Answered by 7 years ago
Edited 7 years ago

In general the PathfindingService would do your job ``game:GetService("PathfindingService") Just try this:

local pf = game:GetService("ParthfindingService")
local zombie = game.Workspace.Zombie.Torso
local placeToGo = game.Workspace.PlaceToGo
local pts = pf:ComputeRawPathAsync(zombie.Position, placeToGo.Position)
for _,v in pairs(pts) do
zombie.Humanoid.WalkToPoint = v
wait(3)
end

After that it should be at your destination Point ;) Hope this helps

0
Except Pathfinding can find it's path maximum in 500 studs, but helpful answer. +1 superalp1111 662 — 7y
0
:) RicheeNektar 78 — 7y
Ad

Answer this question