May seem dumb, but I needed a script to weld together a bunch of unions in a tool, a friend recommended
function Weld(x,y)
local W = Instance.new("Weld")
W.Part0 = x
W.Part1 = y
local CJ = CFrame.new(x.Position)
local C0 = x.CFrame:inverse()*CJ
local C1 = y.CFrame:inverse()*CJ
W.C0 = C0
W.C1 = C1
W.Parent = x
end
function Get(A)
if A.className == "UnionOperation" then
Weld(script.Parent.Handle, A)
A.Anchored = false
else
local C = A:GetChildren()
for i=1, #C do
Get(C[i])
end
end
end
function Finale()
Get(script.Parent)
end
script.Parent.Equipped:connect(Finale)
script.Parent.Unequipped:connect(Finale)
Finale()
But when I test, it welds everything together perfectly, It is angled the wrong way,
local C0 = x.CFrame:inverse()*CJ
local C1 = y.CFrame:inverse()*CJ
I tried editting that to get it to angle correctly, it angles straight up, but if the y axis went to the front by 90 degrees, it would be fine

3 comments
The tool itself is angled the wrong way? Or the parts are in the correct position and rotated wrong? Sorry for the confusion
you need to rotate part x
So Every single part is angled the wrong way, It is all angled straight up, parallel to the player body, I want it to be straight, parallel with the arm