Here’s a link to the pathfinding module I’m using.
Whenever Lighting.ClockTime
changes, I go through all NPCs and call a module NPC_Pathfinding
for _, npc in pairs(CollectionService:GetTagged(activeZone.Name.."_1")) do
if targetDestination then
npc:SetAttribute("target", targetDestination)
local path = NPC_Pathfinding.new(npc, targetDestination)
path:walk()
end
end
Finally, in this module, I call the SimplePath module.
function path:walk()
self.Dummy.AttributeChanged:Connect(function(attributeName)
self.Path:Destroy()
end)
self.Path:Run(self.Goal)
end
As you may notice, whenever attributes assigned to the npc (self.Dummy
) changes, the SimplePath Path is destroyed, so that the NPC will go to the new target instead.
Now everything appears to work fine in-game, but I keep having these errors thrown at me and it’s really pissing me off having to see this in my output constantly. Does anyone have a clue why this keeps happening?
This is where the first error comes from
And the second error is from the SimplePath module (line 286)
Bump