Issues with using AlignPosition as a weld

I’ve been attempting to use AlignPositions as welds so I could have parts follow other parts without affecting orientation. But I’ve recently come across a problem where the position aligning has a visible delay after having the other attachment’s position be set somewhere else.

(that also glitches out the part rotation… somehow)

how could I go about fixing this? RigidityEnabled is set to true, so I was expecting there to be no delay.

local root = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart

local function attachment(part)
	local attach = Instance.new("Attachment")

	attach.Parent = part
	attach.WorldCFrame = part.CFrame

	return attach
end

local part = Instance.new("Part")
part.Massless = true
part.CFrame = root.CFrame
part.CanCollide = false
part.Size = Vector3.one * 10
part.Parent = workspace

local align = Instance.new("AlignPosition")
align.Attachment1 = attachment(root)
align.Attachment0 = attachment(part)
align.RigidityEnabled = true
align.Parent = align.Attachment0

local switch = false

game:GetService("UserInputService").InputBegan:Connect(function(input)
	if input.KeyCode ~= Enum.KeyCode.LeftShift then
		return
	end
	
	root.CFrame = switch and workspace.pos1.CFrame or workspace.pos2.CFrame
	switch = not switch
end)