Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you keep tools stuck together?

How do you use weld on a tool, to keep it together?

1 answer

✓ Accepted answer

You can use this script.

local weldTo = -- Set to part you want to weld everything else in the model to
local parts={weldTo}

function Weld(parent)
	for i,v in pairs(parent:GetChildren()) do
		if v:IsA('BasePart') and v ~= weldTo then
			local w = Instance.new('Weld')
			w.Name = 'Weld'
			w.Part0 = weldTo
			w.Part1 = v
			w.C0 = weldTo.CFrame:inverse()
			w.C1 = v.CFrame:inverse()
			w.Parent = weldTo
			table.insert(parts,v)
		end
		Weld(v)
	end
end

Weld(script.Parent)

for i,v in pairs(parts) do
	v.Anchored = false
end

y so many weld screpts ;-;

-- Leave a +1 Rep If I helped

This discussion is preserved as it was. New answers, comments, and votes are closed.