Quicky Weld Parts

Hello, I was wondering if there was any way to quickly weld all the parts in a model together, or do I have to manually weld each part with each other.
Thank you for your time.

You can paste this code in the command bar

function tree(parent)
	for v, child in pairs(parent:GetChildren()) do
		tree(child)
		if child:IsA("BasePart") then
			local weld = Instance.new("WeldConstraint", child)
			weld.Part0 = child
			weld.Part1 = parent:FindFirstChildWhichIsA("BasePart")
		end
	end
end

tree(game.Workspace["TheModel"])

In “TheModel” change it to the real model.

2 Likes

F3X gets the job done aswell.
Easily welds everything in a model or just 2 parts.

1 Like