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

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

Asked by 7 years ago

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


0
You have not set the welds parent. User#5423 17 — 7y

2 answers

Log in to vote
0
Answered by
Xiousa 156
7 years ago

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

0
as well as what kingdom5 said, you haven't set the parent, either. Xiousa 156 — 7y
0
^^^^ loulou1112 35 — 7y
0
Thanks guys 1000anton 38 — 7y
Ad
Log in to vote
0
Answered by
HLVM 27
7 years ago
Edited 7 years ago

It May help if you read this

Answer this question