This function creates joints between the specified
BasePart|Parts and any touching parts depending on the parts’ surfaces and the specified joint creation mode.
The first parameter is an array of
BasePart|BaseParts. Joints will only be create between the parts in the array and not in the array. Joints will not be created between the parts 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