Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

my tool welding script is not working. can someone tell me why(can you weld UnionOperations?)

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


1 comment

0

You have not set the welds parent.

2 answers

✓ Accepted answer

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

3 comments

0

as well as what kingdom5 said, you haven't set the parent, either.

0

^^^^

0

Thanks guys

This discussion is preserved as it was. New answers, comments, and votes are closed.