Just wanted to let people know that if you want to check for the Attributes of a model which is your unit then you can do so by doing this:
-- this not only allows you to check attributes but completely ignore any with this attribute too
-- This is useful for custom ai systems/swarms allowing the AI to separate from the swarm when it wants too allowing the independent and unified control between the swarm AI and also the models own Ai.
-- You will need to edit line 225~ Just before the bulkmove from workspace.
if unitParts[id].PrimaryPart:GetAttribute("SwarmIgnore") == false then
-- Update position and velocity
local newPos = myPos + vel * dt
unitPos[id] = newPos
unitVel[id] = vel
insert(movePos, newCFrame(newPos.X, UNIT_HEIGHT / 2, newPos.Y) * UNIT_ORIENTATION)
insert(moveParts, unitParts[id])
end