How do I weld a model to a single part and tween it in a script?

Hi, I have a model which I want to tween. I want the model to be welded a single part where I can easily move that part and the whole model moves with it? I tried making some code for it but only the single part moves and not the whole model!

local function Weld(part, base)
	if part == base then return end
	if part:IsA("BasePart") then
		local Weld = Instance.new("Weld")
		Weld.Part0 = part
		Weld.Part1 = base
		Weld.C0 = part.CFrame:toObjectSpace(base.CFrame)
		Weld.Parent = part
	end
end

local function weldCoin(coin)
	local base = coin.PrimaryPart
	local root = Instance.new("Part")

	root.Size = Vector3.new(2, 2, 2)
	root.Position = base.Position
	root.Name = "RootForWelds"
	root.Transparency = 0
	root.Anchored = true
	root.CanCollide = false
	
	root.Parent = coin

	for _, part in ipairs(coin:GetDescendants()) do
		if part:IsA("BasePart") then
			part.CanCollide = false
			part.Anchored = false
			Weld(part, root)
		end
	end
	
	coin.PrimaryPart = root
end

Use WeldConstraints, you can undon the C0 stuff

You also have to weld all parts inside the model with the part being moved and welded with the other part.

Set the part you want to move as the PrimaryPart of your model, then use TweenService to tween the PrimaryPart CFrame.

Can you give me an example please? Like some demonstration code

local function Weld(targetPart, basePart)
    local newWeld = Instance.new("WeldConstraint")
    newWeld.Part0 = basePart
    newWeld.Part1 = targetPart
    newWeld.Name = targetPart.Name
    newWeld.Parent = basePart
end