Like the title says the AI just stays still and does not function correctly after being ignored by workspace:BulkMoveTo
. The console log prints like everything is correct (I am using a pcall which I will provide
)
I am using FastFlow if anyone was wondering. I am also writing my own AI system off of it too however this is not important to elaborate on.
AI Code (Partical. Only code that needs to be displayed):
There is only one player in the server aka my self meaning that this should not cause any issues.
for i,target: Player in pairs(game:GetService("Players"):GetPlayers()) do
local char = target.Character or target.CharacterAdded:Wait()
assert(char, "Char does not exist for "..target.Name)
if not (char:FindFirstChildOfClass("Humanoid").Health > 0) then
return
end
if character.PrimaryPart:GetAttribute("Manual") == true then
local x,y,z = char.PrimaryPart.CFrame.Position.X, char.PrimaryPart.CFrame.Position.Y, char.PrimaryPart.CFrame.Position.Z
local s,e = pcall(function()
character.Humanoid:MoveTo(Vector3.new(x, y, z))
end)
print("moving")
print(s, e)
if character.PrimaryPart:GetAttribute("SwarmIgnore") == false then
character.PrimaryPart:SetAttribute("SwarmIgnore", true)
end
else
character.PrimaryPart:SetAttribute("SwarmIgnore", false)
end
end
Console Log (This does loop correctly:
17:54:21.637 moving - Server - Ai:23
17:54:21.638 true nil - Server - Ai:24