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

How can I get a part in workspace from a WeldConstraint?

Asked by
Rukreep 15
3 years ago

I'm doing a game in where you can pick up specific types of tools. But, how can I get a part from a WeldConstraint that's already referenced?

1 answer

Log in to vote
0
Answered by
TGazza 1336 Moderation Voter
3 years ago

you can get the parts that are connected with the constraint via:

WeldConstraint.Part0 = [Basepart or nil]
WeldConstraint.Part1 = [Basepart or nil]
WeldConstraint.Parent = [Model/group or Basepart]

Basepart = Any physical part Model/Group = Any group of objects like a Model or folder object

Part0-1 can be nil if the part gets deleted, though in the past it used to still reference the deleted part. But that was a bug that hopefully got fixed!.

hope this helps!

Devblog link: [email protected]

Ad

Answer this question