Creates joints between the specified
BaseParts and any touching parts depending on the
BasePart's surfaces and the specified joint creation mode.
The first parameter of this function is an array of
BaseParts. Note, joints will not be created between these
BaseParts (each other), only between these
BaseParts and other
BaseParts not in the array.
The second parameter is a
Enum/JointCreationMode that determines how joints will be created. The following options are available:
- All: Joints created between any touching parts
- Surface: Joints created between parts with compatible surfaces
- None: No joints created. Causes this function to do nothing.
This function is used by the Roblox Studio Move tool when the user finishes moving a selection. In conjunction with
Workspace/UnjoinFromOutsiders it can be used to retain join functionality when developing custom studio build tools. See the snippets below for an example.
-- finished moving a selection, make joints local function finishedMovingParts(parts) local joinMode = Plugin:GetJoinMode() workspace:JoinToOutsiders(parts, joinMode) end
-- started moving a selection, break joints local function startMovingParts(parts) workspace:UnjoinFromOutsiders(parts) end
Developers interested in seeing how this function is used in the Roblox Studio should see the Studio Tools GitHub repository.
An array of