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

How can I fix this weld?

Asked by 7 years ago
Edited 7 years ago

I'm trying to weld many objects to one. Code here:

01local function addWeld(folder, part)
02    local weld = Instance.new("ManualWeld")
03    weld.Parent = part
04    if not folder then
05        weld.Part0 = part.Parent.Chassis
06    else
07        weld.Part0 = part.Parent.Parent.Chassis
08    end
09    weld.Part1 = part
10    weld.C0 = part.CFrame * CFrame.new(0, 0, 0)
11    if part.Name ~= "Base" then
12        part.Anchored = false
13    end
14end
15 
View all 25 lines...

All of it seems to work except for the final line workspace.Banshee.Chassis.Anchored = false. This causes the Chassis part to jump to the 0 position on all axes. Any idea what's going on?

Answer this question