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
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
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
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Except Pathfinding can find it's path maximum in 500 studs, but helpful answer. +1
:)