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
Do find a cframe location of something all u do is run the game, then move ur roblox Character to the deriction you want the cframe to be then while the game is runnning goto workspace select the model with ur name then goto the Head Part and under which is the property u'll see a section called location and that will be the loaction