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

Can Unions be welded?

Asked by 8 years ago

Just as the title says, can UnionOperations be welded together? I cannot get them to weld using any kind of weld script...

0
I believe they can be welded together. fishguy100 135 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

Yep, they can. Try it out with this (make sure the unions and/or parts are in a model and that they are anchored and in the position you want):

PartName="the name of the part/union you want the welds to be in"

local function weldBetween(a, b)
    local weld = Instance.new("ManualWeld", a)
    weld.Part0 = a
    weld.Part1 = b
    weld.C0 = a.CFrame:inverse() * b.CFrame
    return weld
end

for i,v in pairs(script.Parent:GetChildren()) do
    if not(v.Name==PartName) and not(v:IsA("Script"))then
        weldBetween(script.Parent[PartName], v)
        v.Anchored=false
    end
end
script.Parent[PartName].Anchored=false
0
Does not keep parts in their positions... Only groups them at the handle's position. TheArmoredReaper 173 — 8y
0
What do you mean? I tried that exact scrip myself and it kept the position of all the parts. BobserLuck 367 — 8y
0
Did you make sure the parts are anchored to begin with? BobserLuck 367 — 8y
Ad

Answer this question