Roblox UtilitiesDevlHub Roblox Documentation

Weld

WeldConstraint attaches two BaseParts together and ensures they stay in the same relative position and orientation to each other.

A WeldConstraint connects two BaseParts and ensures they stay in the same relative position and orientation to each other. Even if the two parts are not touching, you can weld them together.

To attach two Attachments or Bones, versus two BaseParts, see RigidConstraint.

Unique to WeldConstraint are slight behavioral differences in how Studio handles creation and repositioning of welded parts.

Weld Creation

When creating a WeldConstraint using Studio's Constraint button, the tool behaves differently depending on how many BaseParts are selected when the tool is activated:

Repositioning Welded Parts

Roblox handles moving a welded part differently depending on whether the part was moved through its Position or through its CFrame.

  • If a welded part's Position is updated, that part will move but none of the connected parts will move with it. The weld will recalculate the offset from the other parts based on the moved part's new position.

  • If a welded part's CFrame is updated, that part will move and all of the connected parts will also move, ensuring they maintain the same offset as when the weld was created.