--// wonuf


wait()

local WeldHoldPart = script.Parent.Parent.Base --What everything will be welded to

function weld(c1,c2)
	c2.Anchored = false
	local w = Instance.new("Weld")
	w.Part0 = c1
	w.Part1 = c2
	w.C1 = c2.CFrame:inverse() * c1.CFrame
	w.Parent = WeldHoldPart
end

function scan(obj)
	for _,v in pairs(obj:GetChildren()) do
		if v:IsA('BasePart') then
			weld(WeldHoldPart, v)
			scan(v)
		else
			scan(v)
		end
	end
end

scan(script.Parent) --Whatever you want to scan/weld