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

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

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

✓ Accepted answer

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: WeldConstraint@developer.roblox.com

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