PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

JoinToOutsiders

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:

Name Description
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 Plugin/GetJoinMode and 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.

Parameters

Name Type Default Description

An array of BaseParts for whom joints are to be made.

The Enum/JointCreationMode to be used.

Returns

Return Type Summary