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

How Do I Weld MeshParts Together to be Used In a Tool?

Okay I 3D Modeled a gun in blender(had to make many parts because polygon limit for roblox). I exported them into roblox as MeshParts. Everything is together now, and I need to weld it all together to be used as a tool. I went into toolbox and grabbed this script. I tried to change part to MeshPart, but no difference. ~~~~~~~~~~~~~~~~~ local Tool = script.Parent

function Weld(X, Y) local W = Instance.new("Weld") W.Part0 = X W.Part1 = Y local C = CFrame.new(X.Position) local C0 = X.CFrame:inverse() * C local C1 = Y.CFrame:inverse() * C W.C0 = C0 W.C1 = C1 W.Parent = X end

function WeldAll(A) if A:IsA("MeshPart") then Weld(Tool.Handle, A) A.Anchored = false A.CanCollide = false else for _, X in pairs(A:GetChildren()) do WeldAll(X) end end end

Tool.Equipped:connect(function() WeldAll(Tool) end)

Tool.Unequipped:connect(function() WeldAll(Tool) end)

WeldAll(Tool)


1 answer

✓ Accepted answer

don't use a random free model weld script. there are many weld plugins that don't use scripts that will easily weld all of the objects by a click of a button. here's what i use: Weld plugin P.S. you can only install plugins in roblox studio

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