Problem with custom enemy

Hello, why does this not work (code in sss)

local freddy = game.Workspace.GlamrockFreddy
local anim = freddy.Humanoid.Animator:LoadAnimation(script.Animation):Play()

local pfs = game:GetService("PathfindingService")
local pth = pfs:CreatePath()

pth:ComputeAsync(freddy.HumanoidRootPart.Position, game.Workspace.Part.Position)

for i, pathpoint in pairs(pth:GetWaypoints()) do


Ensure that none of the parts in the enemy are anchored.

Maybe try adding a wait after the MoveTo (I dont deal with NPCs much, so it may yield. I dont think it does though)

1 Like