Motor6D

The joints of a Roblox-style rig. Join two parts and the second follows the first; turn it and it swings about the joint, ready to key.

A Motor6D drives its Part1 by Roblox's formula, Part1.CFrame = Part0.CFrame * C0 * Transform * C1:Inverse(), solved every frame from the start of each rig out to the tips, in Edit and Play. Transform is the pose: keys, rig clips, wires and scripts animate it. Move or turn Part1 by hand and it stays where you put it. To make one, select two parts, right-click in the Explorer and choose Join with Motor6D: nothing moves.

Example

Join two parts and pose the jointLuau
local studio = Root.Sandbox.DataModels.Studio
local function part(name, x)
	local p = Instance.new("Part")
	p.Name = name
	p.Size = Vector3.new(2, 1, 1)
	p.CFrame = CFrame.new(x, 5, 0)
	p.Parent = studio
	return p
end
local b = part("ChainB", 4)
local c = part("ChainC", 9)
local jb = Instance.new("Motor6D")
jb.Name = "JointB"
jb.Part0 = b
jb.Part1 = c
jb.C0 = CFrame.new(1.5, 0, 0) * CFrame.Angles(0, 0, math.rad(10))
jb.C1 = CFrame.new(-1.5, 0, 0)
jb.Parent = studio
jb.Transform = CFrame.Angles(0, math.rad(45), 0)

Properties

Scripts

NameTypeDefaultDescription
Activebooleanscripts onlyWhether the joint drives its Part1 right now.

Joint

C0CFrame0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1Part of the rig with C1; hold Alt as a viewport drag starts to rewrite C0 instead of posing the part.
C1CFrame0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1Part of the rig with C0; moving Part1 by hand poses the joint and leaves C0 and C1 as they are.
EnabledbooleantrueThe joint is active only when Enabled and both parts are in its own DataModel.
Part0BasePartThe part Part1 is held to.
Part1BasePartThe part the joint drives, placed at Part0.CFrame * C0 * Transform * C1:Inverse().
C0PositionVector3Properties window onlyThe old split position part of C0, hidden from Properties.
C0OrientationVector3Properties window onlyThe old split rotation half of C0, hidden from Properties.
C1PositionVector3Properties window only
C1OrientationVector3Properties window only

Pose

TransformCFrame0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1The pose; scripts and wires animate it.
TransformPositionVector3Properties window onlyThe old split position part of Transform, hidden from Properties.
TransformOrientationVector3Properties window onlyThe old split rotation half of Transform, hidden from Properties.
From Instance 22