Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to weld parts in a Model if there are more than two parts?

Asked by 6 years ago
Edited 6 years ago

I am very familiar with welding and I have been curious as to ask how to weld multiple parts if there are more than two parts in a given model. This is the script I have:

function Weld(p1, p2)
    local w = Instance.new("Weld", game.JointsService)
    w.C1 = p1.CFrame:toObjectSpace(p2.CFrame)
    w.Part0 = p1
    w.Part1 = p2
end
Weld(game.Workspace["Stage 2"]["Metal Spin"].RotatingPlatform, game.Workspace["Stage 2"]["Metal Spin"].MotorStick)

(By the way, if anyone asks if this is a LocalScript or just a Script, it is just a Script because why would a Weld like this one run locally, you know? I do not understand the mentality of some scripters these days.)

0
I'm assuming this has something to do with GetChildren(), but the Script is inside the Model. So maybe not. DeceptiveCaster 3761 — 6y
0
You should parent the weld to the JointsService last. There's been some research about this on the devforum. Dog2puppy 168 — 6y
0
... Ok, but I want an actual answer. DeceptiveCaster 3761 — 6y

Answer this question