if AttackPathFinding == true then --AttackPathFinding is a parameter
print('AttackPathFinding is true')
local PFS = game:GetService("PathfindingService")
local ClonedHumanoid = ToClone:FindFirstChild("Humanoid")
local Target = game.Workspace.Water --Placeholder
local AttackPath = PFS:CreatePath()
AttackPath:ComputeAsync(ToClone.HumanoidRootPart.Position,Target.Position)
local AttackWaypoints = AttackPath:GetWaypoints()
local MoveNPC = coroutine.create(function()
for _,MovementWaypoints in pairs(AttackWaypoints) do
ClonedHumanoid:MoveTo(MovementWaypoints.Position)
print('Moved NPC')
wait(0.05)
end
end)
coroutine.resume(MoveNPC)
end
All of the prints work, the NPC's just won't move, the HumanoidRootPart that they are cloned from is Unanchored, and they simply won't move.
