for i, visual in ipairs(self.Visuals) do
local worldOffset = centerCFrame:VectorToWorldSpace(visual.BaseOffset)
local targetPosition = centerCFrame.Position + worldOffset
targetPosition = Vector3.new(targetPosition.X, self.FloorY, targetPosition.Z)
visual.Attachment.WorldPosition = targetPosition
visual.Part.Position = targetPosition
local data = self.Troops[i]
local npc = data.Model
local offsetY = npc.Torso.Size.Y / 2 + npc["Right Leg"].Size.Y - 0.15
data.AP.Position = visual.Attachment.WorldPosition + Vector3.new(0, offsetY, 0)
end
Simple follow movement made with AlignPosition, each NPC has an attachment in its root part linked to an AlignPosition that is updated with renderstep. The problem is that movement jitters when playing on 240 fps. For some reason, the jitter is gone when shiftlock is enabled or when on 60 fps.
The NPCs are created on the clientside. The AlignPosition has 10000 MaxForce, 100 MaxVelocity, and 40 Responsiveness.
it doesn’t jitter; you are linking objects to an instance which is already moving in steps
the camera you are using smoothes it away - therefore you haven’t noticed this before
you can verify it by looking into the CameraController built-in script
The attachments were not synced to the character position, which unsynced the movement and caused the visual jitter. Parenting the attachments to the character humanoidrootpart and using two attachment mode fixed the issue.
it haven’t “solved” anything
you have just found a combination of factors which suits your specific needs at this point
the problem is not solved