Head Accessories need to be rewelded when size changes

This script moves the Head and Head Accessories down and changes the size to 3/4 of its original size but the accessories float due to the welds not changing, maybe I’ve written it weird but I cant seem to find a way to universally reattach the accessories back to the head without changing individual weld values.

Most of the time they are decently placed but some accessories really stick out. The Screenshots show the accessories having their size changed but they are attached where the head used to be.

local function moveAndScaleHead(character)
	local head = character:FindFirstChild("Head")
	if not head then
		warn("Head not found in character")
		return
	end

	local moveAmount = Vector3.new(0, -0.25, 0)
	local scaleFactor = 3 / 4

	head.Size = head.Size * scaleFactor
	head.CFrame = head.CFrame * CFrame.new(moveAmount)

	for _, attachment in pairs(head:GetChildren()) do
		if attachment:IsA("Attachment") then
			attachment.Position = attachment.Position * scaleFactor
		elseif attachment:IsA("Part") then
			attachment.Size = attachment.Size * scaleFactor
			attachment.CFrame = attachment.CFrame * CFrame.new(moveAmount)
		elseif attachment:IsA("Weld") or attachment:IsA("Motor6D") then
			attachment.C0 = attachment.C0 * CFrame.new(moveAmount)
		end
	end

	for _, accessory in pairs(character:GetChildren()) do
		if accessory:IsA("Accessory") and accessory:FindFirstChild("Handle") then
			local handle = accessory.Handle
			handle.Size = handle.Size * scaleFactor

			local accessoryAttachment = handle:FindFirstChildOfClass("Attachment")
			local headAttachment = head:FindFirstChild(accessoryAttachment.Name)

			if accessoryAttachment and headAttachment then
				local offset = headAttachment.CFrame:inverse() * accessoryAttachment.CFrame
				handle.CFrame = head.CFrame * offset * CFrame.new(0, -0.25, 0) * CFrame.Angles(0, 0, 0)
			end
		end
	end
end

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		wait(1)
		moveAndScaleHead(character)
	end)
end)

local function moveAndScaleHead(character)
  local head = character:FindFirstChild("Head")
  if not head then
    warn("Head not found in character")
    return
  end

  local moveAmount = Vector3.new(0, -0.25, 0)
  local scaleFactor = 3 / 4

  head.Size = head.Size * scaleFactor
  head.CFrame = head.CFrame * CFrame.new(moveAmount)

  for _, attachment in pairs(head:GetChildren()) do
    if attachment:IsA("Attachment") then
      attachment.Position = attachment.Position * scaleFactor
    elseif attachment:IsA("Part") then
      attachment.Size = attachment.Size * scaleFactor
      attachment.CFrame = attachment.CFrame * CFrame.new(moveAmount)
    elseif attachment:IsA("Weld") or attachment:IsA("Motor6D") then
      attachment.C0 = attachment.C0 * CFrame.new(moveAmount)
    end
  end

  for _, accessory in pairs(character:GetChildren()) do
    if accessory:IsA("Accessory") and accessory:FindFirstChild("Handle") then
      local handle = accessory.Handle
      handle.Size = handle.Size * scaleFactor

      local accessoryAttachment = handle:FindFirstChildOfClass("Attachment")
      local headAttachment = head:FindFirstChild(accessoryAttachment.Name)

      if accessoryAttachment and headAttachment then
        -- Recalculate offset after head size change
        local offset = headAttachment.CFrame:inverse() * accessoryAttachment.CFrame
        handle.CFrame = head.CFrame * offset * CFrame.new(0, -0.25, 0) * CFrame.Angles(0, 0, 0)

        -- Re-weld the accessory to the head using the updated offset
        local weld = Instance.new("Weld")
        weld.C0 = headAttachment.CFrame
        weld.C1 = handle.CFrame * CFrame.new(0, 0, 0.05) -- Adjust based on your desired attachment position
        weld.Parent = head

        -- Optionally, destroy the previous weld if you don't need it anymore
        accessoryAttachment:Destroy()
      end
    end
  end
end

game.Players.PlayerAdded:Connect(function(player)
  player.CharacterAdded:Connect(function(character)
    wait(1)
    moveAndScaleHead(character)
  end)
end)

cheers but i cant create new welds and manually set them because il pass from old age before i finish