so if i tryed this one part of the handle would be together but the rest of my tool woudl be welded like 20 feet away from the actual Handle that im welding it to.
for i, v in pairs(script.Parent:GetChildren()) do
if v.ClassName == "UnionOperation" or "Part" or "WedgePart" then
weld = Instance.new("Weld")
weld.Part0 = Handle
weld.Part1 = v.CFrame
weld.C0 = Handle.CFrame:inverse()
weld.C1 = v.CFrame:inverse()
v.Anchored = false
end end
if v.ClassName == "UnionOperation" or "Part" or "WedgePart" then
You cannot do this.
You would have to do
if v.ClassName == "UnionOperation" or v.ClassName == "Part" or v.ClassName =="WedgePart" then
Also, ClassName is deprecated now Try using v:IsA() instead.
So, with all that in mind, it would be
if v:IsA("UnionOperation") or v:IsA("Part") or v:IsA("WedgePart") then