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

How do I fix my unions not showing up on my tools. (A shield to be specific)?

Asked by 4 years ago
Edited 4 years ago

I have a tool that I would like to use but when I put it into the Starter pack and equip it, the unions won't show. I also have this script in it in case this has anything to do with it

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 == "Part" 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()

1 answer

Log in to vote
0
Answered by
royaltoe 5144 Moderation Voter Community Moderator
4 years ago

Unions class name is a UnionOperation, not a part so it isn't welding your unions.

0
Thank you BabyHades_2 40 — 4y
0
no problem. i like your weld script. royaltoe 5144 — 4y
Ad

Answer this question