while wait(0.1) do
path = game:GetService("PathfindingService"):ComputeRawPathAsync(script.Parent.Torso.Position,game.Workspace.MagnTest.Position,511)
points = path:GetPointCoordinates()
print(points)
game.Workspace.Points:ClearAllChildren()
local xde = nil
for p = 1,#points do
part = Instance.new("Part")
part.FormFactor = Enum.FormFactor.Symmetric
part.CanCollide = false
part.Size = Vector3.new(1,1,1)
part.Position = points[p]
part.CFrame = part.CFrame - Vector3.new(0,3,0)
part.Anchored = true
part.BrickColor = BrickColor.DarkGray()
part.Parent = game.Workspace.Points
part.Name = "part"..p..""
xde = "part"..p
end
local zaa = game.Workspace.Points:GetChildren()
for i = 3,#zaa do
script.Parent.Zombie:MoveTo(game.Workspace.Points:FindFirstChild("part"..i).Position,game.Workspace.Points:FindFirstChild("part"..i))
local mag1 = script.Parent.Torso.Position - game.Workspace.Points:FindFirstChild("part"..i).Position
local mag = mag1.Magnitude
repeat wait() print(mag) until mag <= 10
end end
Zombie walks to the first part and then just stops.
If you're going to test this in your place make sure you put an empty model called "Points" first.

1 comment
I see what you mean , I did it , didn't work at the start but once I changed minimum magnitude to 4 from 2 it worked like a charm, thanks!