---
title: "Weld"
url: /docs/en-us/physics/constraints/weld
last_updated: 2026-07-08T21:51:46Z
description: "WeldConstraint attaches two BaseParts together and ensures they stay in the same relative position and orientation to each other."
---

# Weld

A `Class.WeldConstraint` connects two `Class.BasePart|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.

> **Info:** To attach two `Class.Attachment|Attachments` or `Class.Bone|Bones`, versus two `Class.BasePart|BaseParts`, see [RigidConstraint](/docs/en-us/physics/constraints/rigid.md).

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

#### Weld Creation

When creating a `Class.WeldConstraint` using Studio's [Constraint](/docs/en-us/physics/mechanical-constraints.md#create-constraints) button, the tool behaves differently depending on how many `Class.BasePart|BaseParts` are selected when the tool is activated:

- If no `Class.BasePart|BaseParts` are selected, the next two `Class.BasePart|BaseParts` clicked will be connected by a new `Class.WeldConstraint`. If the same `Class.BasePart` is clicked twice, no constraint will be created.
- If one `Class.BasePart` is already selected, the next `Class.BasePart` clicked will be connected to the selected one with a new `Class.WeldConstraint`.
- If multiple `Class.BasePart|BaseParts` are selected, those which are touching or overlapping will be automatically welded together by new `Class.WeldConstraint|WeldConstraints`.

#### Repositioning Welded Parts

Roblox handles moving a welded part differently depending on whether the part was moved through its `Class.BasePart.Position|Position` or through its `Datatype.CFrame`.

- If a welded part's `Class.BasePart.Position|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 `Datatype.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.