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:
01 | local function addWeld(folder, part) |
02 | local weld = Instance.new( "ManualWeld" ) |
05 | weld.Part 0 = part.Parent.Chassis |
07 | weld.Part 0 = part.Parent.Parent.Chassis |
10 | weld.C 0 = part.CFrame * CFrame.new( 0 , 0 , 0 ) |
11 | if part.Name ~ = "Base" then |
16 | for i,v in pairs (workspace.Banshee:GetChildren()) do |
17 | if v:IsA( "Folder" ) then |
18 | for j,w in pairs (v:GetChildren()) do |
21 | elseif v.Name ~ = "Chassis" then |
24 | workspace.Banshee.Chassis.Anchored = false |
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?