Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
IKControl
Inherits from: Instance → Object
IKControl instances generate procedural animation poses using Inverse Kinematics (IK). They allow you to make characters respond realistically to their environment.
For example, you can make a character place its hand on a door handle exactly, and the character will do so independently of its position. IKControls provide the advantage of needing to create much fewer animations for your game while giving your experience a more realistic and polished feel.
IKControls must be a child of a Humanoid or AnimationController with an Animator and have all of their required properties set properly, otherwise they don't have any effect. The required properties are Type, EndEffector, Target, ChainRoot. As soon as those are set, the IKControl modifies the pose of your character as you specify. The following code sample demonstrates how to set up your first IKControl and get started with creating more realistic animations for your game.
You can use IKControls to make a character:
- Rotate its head and torso to look at a point of interest in the world.
- Modify its feet positions to respond to dynamic terrain. Adjust its legs and feet to place them accordingly on terrain with rocks and slopes.
- Hold a gun and place its hands appropriately on the grip without needing to create animations for each gun in the game.
- Aim at a point in the world, so that the tip of the gun point exactly at what you want to shoot. Especially useful in third person shooters.
- Place its hands on the steering wheel of a car and follow it when it rotates.
- Much more!
IKControl will override the animation for all the parts between the ChainRoot and the EndEffector. You can enable/disable it using Enabled or change how much they have an effect over the underlying animation using the Weight. Be careful: if you do not set up your IKControls correctly, you might generate bad and unrealistic poses!
Inherits from: Instance
Memory category: Animation
Code samples: View on Creator Hub (IKControl-Setup).
Properties
| Name | Type / Returns | Description |
|---|---|---|
| IKControl.ChainRoot | Instance | The last part that you are interested in moving your character. For example, the upper arm. Must be an ancestor of EndEffector and be a BasePart or a Bone in your character. |
| IKControl.Enabled | boolean | Toggles the control on and off. True by default. |
| IKControl.EndEffector | Instance | The part that you are interested in moving to reach the Target. For example, the hand of your character. Must be a descendant of ChainRoot and be a BasePart or a Bone in your character. |
| IKControl.EndEffectorOffset | CFrame | An additional offset applied on top of the EndEffector in its local space to change where it moves. |
| IKControl.Offset | CFrame | An additional offset applied on top of the Target to change where the EndEffector moves. |
| IKControl.Pole | Instance | An optional instance that determines which way the chain bends. You can use this to specify which way an elbow or knee bends. |
| IKControl.Priority | int | Specifies the order in which controls are solved. Higher values have higher priority. |
| IKControl.SmoothTime | float | Specifies the average number of seconds that it takes for the EndEffector to smoothly reach the Target. |
| IKControl.Target | Instance | The object that the EndEffector reaches for or points at. It can be anything that has a position in the world, such as BasePart, Attachment, Bone, or Motor6D. |
| IKControl.Type | IKControlType | Specifies how the solver satisfies this control. |
| IKControl.Weight | float | Specifies the weight of the IK control target. Should be in the [0, 1] range. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.Archivable | boolean | Determines if an Instance and its descendants can be cloned using Instance:Clone(), and can be saved/published. |
| Instance.archivable | boolean | |
| Instance.Capabilities | SecurityCapabilities | The set of capabilities allowed to be used for scripts inside this container. |
| Instance.IsInSandbox | boolean | Indicates whether the instance is inside a sandboxed container. |
| Instance.Name | string | A non-unique identifier of the Instance. |
| Instance.Parent | Instance | Determines the hierarchical parent of the Instance. |
| Instance.PredictionMode | PredictionMode | Reflects the client-side prediction mode applied to the instance under server-authoritative physics. |
| Instance.RobloxLocked | boolean | A deprecated property that used to protect CoreGui objects. |
| Instance.Sandboxed | boolean | When enabled, the instance can only access abilities in its Capabilities list. |
| Instance.UniqueId | UniqueId | A unique identifier for the instance. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.ClassName | string | A read-only string representing the class this Object belongs to. |
| Object.className | string |
IKControl.ChainRoot
By specifying a ChainRoot and an EndEffector, you instruct the IKControl that it's allowed to move and rotate all parts between the two to move the EndEffector to the Target. For example, if you specify the LeftHand as EndEffector and LeftUpperArm as the ChainRoot, the control moves 3 parts: the LeftHand, the LeftLowerArm, and the LeftUpperArm. Avoid setting ChainRoot as the actual root of the character because that produces unrealistic results.
| Field | Value |
|---|---|
| type | Instance |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Behavior |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Animation"] |
| simulationAccess | true |
IKControl.Enabled
This property allows you to toggle the IK control on and off. It's on by default. When Enabled is false, the IK control is off and isn't resolved by the underlying solver.
| Field | Value |
|---|---|
| type | boolean |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Behavior |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Animation"] |
| simulationAccess | true |
IKControl.EndEffector
The EndEffector describes the last part in the chain of your character that you want to affect. For example, it could be the hand when you want to move the whole arm to reach a point. It can be a BasePart on a character, that has a Motor6D as its child, a Motor6D directly, a Bone, or a Attachment. The pivot of the selected EndEffector moves to the Target, so you can use Attachments to modify which point of a BasePart should reach the Target.
| Field | Value |
|---|---|
| type | Instance |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Behavior |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Animation"] |
| simulationAccess | true |
IKControl.EndEffectorOffset
The end-effector offset is an additional CFrame applied on top of the Target CFrame that produces the final CFrame used to place the EndEffector. By default, it's the identity CFrame, so if you don't set it, it has no effect and the EndEffector uses the Target CFrame directly, which is specified in the local space of the EndEffector.
Alternatively, you can use Attachments by setting an Attachment as EndEffector, which moves it to the Target instead of the parts it's attached to, effectively obtaining the same result.
You can also use EndEffectorOffset to modify which axis of the EndEffector should point at the Target when using LookAt as Type.
| Field | Value |
|---|---|
| type | CFrame |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Behavior |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Animation"] |
IKControl.Offset
The offset is an additional CFrame applied on top of the Target CFrame that produces the final CFrame used to place the EndEffector. It's identity by default, so if you don't set it, it has no effect and the EndEffector will use the Target CFrame directly. You can animate it to create procedural animations such as typing on a keyboard. It's useful when the Target and EndEffector aren't aligned and you need to fix it with an additional rotation or translation.
| Field | Value |
|---|---|
| type | CFrame |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Behavior |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Animation"] |
IKControl.Pole
The Pole is an optional Instance that gives you control over how intermediate parts in your character should bend. It can be anything that has a position in the world, such as BasePart, Attachment, Bone, Motor6D. It is by default nil. When you specify it, the underlying solver will make the parts bend towards it. When it is nil, the solver will try to make elbows and knees bend appropriately based on the limb of the character. The limb will be "Arm" when you select as EndEffector either the LeftHand or RightHand and as ChainRoot the corresponding LeftUpperArm or RightUpperArm, and it will be "Leg" when you select as EndEffector either the LeftFoot or RightFoot and as ChainRoot the corresponding LeftUpperLeg or RightUpperLeg. In all other cases, if you don't specify a pole, the chain might not bend as you expect.
| Field | Value |
|---|---|
| type | Instance |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Behavior |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Animation"] |
IKControl.Priority
When multiple controls are active on a character, the order in which they are solved by the underlying system affects the final generated pose. By changing this value, you specify the ordering in which controls are satisfied. Higher values have higher priority, and higher-priority controls are resolved later because their result might override the previous result of other controls. If you have multiple IK controls on a character and one is more important than the other, specify a lower priority for it. It is 0 by default, meaning all controls have the same priority.
| Field | Value |
|---|---|
| type | int |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Behavior |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Animation"] |
IKControl.SmoothTime
This value specifies the average number of seconds that it takes for the EndEffector to reach the Target. The behavior is that of a critically-damped spring, where the rate of change is proportional to the distance to the target and no oscillations are present when approaching the target. Smaller values create a quicker convergence, and larger values create a slower convergence. A value of 0 disables smoothing. The default value is 0.05 to provide a very slight smoothing that makes the motion feel realistic.
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Behavior |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Animation"] |
IKControl.Target
The Target represents a point (CFrame) in the world that you want your EndEffector to reach. The exact behavior of reaching can be set via the Type property, and an additional Offset can be applied on top of it to modify it. If you set a Target that will be moved either by physics or a script, at each frame the IKControl will try to satisfy it, automatically updating the point to reach.
| Field | Value |
|---|---|
| type | Instance |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Behavior |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Animation"] |
| simulationAccess | true |
IKControl.Type
By changing the Type, you can change the behavior of the control. These are the available options:
- Transform: it's a full 6-DoF constraint. Aligns the
EndEffectorCFrameto that of theTarget. - Position: aligns the
EndEffectorposition to that of theTarget. - Rotation: aligns the
EndEffectorrotation to that of theTarget. - LookAt: moves and orients the whole chain to make an axis (by default the forward axis) on the
EndEffectorpoint at a position in the world specified byTarget.
| Field | Value |
|---|---|
| type | IKControlType |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Behavior |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Animation"] |
| simulationAccess | true |
IKControl.Weight
You can control how much a given control affects the character pose by using this property. Values should be in the [0, 1] range. 0 means no effect, and 1 means full effect of the IK control. Values outside this range are truncated. Smoothly varying this value allows you to blend in or out a specific control to avoid jarring motion. It is 1 by default.
The weight determines the interpolation factor between the End-Effector and the IK target. Setting the weight to 0 doesn't disable the IK Control because other factors, including the SmoothTime smoothing factor and Pole, can still change the pose. To truly disable the IK Control, turn the Enabled property to false.
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Behavior |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Animation"] |
| simulationAccess | true |
Methods
| Name | Type / Returns | Description |
|---|---|---|
| IKControl:GetChainCount | int | Returns the number of segments in the IK chain between the ChainRoot and the EndEffector. |
| IKControl:GetChainLength | float | Returns the total length, in studs, of the IK chain between the ChainRoot and the EndEffector. |
| IKControl:GetNodeLocalCFrame | CFrame | Returns the CFrame of the chain node at the given index, relative to its parent node in the chain. |
| IKControl:GetNodeWorldCFrame | CFrame | Returns the world-space CFrame of the chain node at the given index. |
| IKControl:GetRawFinalTarget | CFrame | Returns the world-space target CFrame the solver aims for before SmoothTime smoothing is applied. |
| IKControl:GetSmoothedFinalTarget | CFrame | Returns the world-space target CFrame the solver aims for after SmoothTime smoothing is applied. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance:AddTag | () | Applies a tag to the instance. |
| Instance:children | Instances | Returns an array of the object's children. |
| Instance:ClearAllChildren | () | This method destroys all of an instance's children. |
| Instance:Clone | Instance | Create a copy of an instance and all its descendants, ignoring instances that are not Archivable. |
| Instance:clone | Instance | |
| Instance:Destroy | () | Sets the Instance.Parent property to nil, locks the Instance.Parent property, disconnects all connections, and calls Destroy() on all children. |
| Instance:destroy | () | |
| Instance:FindFirstAncestor | Instance? | Returns the first ancestor of the Instance whose Instance.Name is equal to the given name. |
| Instance:FindFirstAncestorOfClass | Instance? | Returns the first ancestor of the Instance whose Object.ClassName is equal to the given className. |
| Instance:FindFirstAncestorWhichIsA | Instance? | Returns the first ancestor of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstChild | Instance? | Returns the first child of the Instance found with the given name. |
| Instance:findFirstChild | Instance | |
| Instance:FindFirstChildOfClass | Instance? | Returns the first child of the Instance whose ClassName is equal to the given class name. |
| Instance:FindFirstChildWhichIsA | Instance? | Returns the first child of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstDescendant | Instance? | Returns the first descendant found with the given Instance.Name. |
| Instance:GetActor | Actor? | Returns the Actor associated with the Instance, if any. |
| Instance:GetAttribute | Variant | Returns the value which has been assigned to the given attribute name. |
| Instance:GetAttributeChangedSignal | RBXScriptSignal | Returns an event that fires when the given attribute changes. |
| Instance:GetAttributes | Dictionary | Returns a dictionary of the instance's attributes. |
| Instance:GetChildren | Instances | Returns an array containing all of the instance's children. |
| Instance:getChildren | Instances | |
| Instance:GetDebugId | string | Returns a coded string of the debug ID used internally by Roblox. |
| Instance:GetDescendants | Instances | Returns an array containing all of the descendants of the instance. |
| Instance:GetFullName | string | Returns a string describing the instance's ancestry. |
| Instance:GetStyled | Variant | Returns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified. |
| Instance:GetStyledPropertyChangedSignal | RBXScriptSignal | Returns an event that fires when the given style property changes on the instance. |
| Instance:GetTags | Array | Gets an array of all tags applied to the instance. |
| Instance:HasTag | boolean | Check whether the instance has a given tag. |
| Instance:IsAncestorOf | boolean | Returns true if an Instance is an ancestor of the given descendant. |
| Instance:IsDescendantOf | boolean | Returns true if an Instance is a descendant of the given ancestor. |
| Instance:isDescendantOf | boolean | |
| Instance:IsPropertyModified | boolean | Returns true if the value stored in the specified property is not equal to the code-instantiated default. |
| Instance:QueryDescendants | Instances | Returns an array containing all descendants of the instance that match the selector string. |
| Instance:Remove | () | Sets the object's Parent to nil, and does the same for all its descendants. |
| Instance:remove | () | |
| Instance:RemoveTag | () | Removes a tag from the instance. |
| Instance:ResetPropertyToDefault | () | Resets a property to its default value. |
| Instance:SetAttribute | () | Sets the attribute with the given name to the given value. |
| Instance:WaitForChild | Instance | Returns the child of the Instance with the given name. If the child does not exist, it will yield the current thread until it does. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object:GetPropertyChangedSignal | RBXScriptSignal | Get an event that fires when a given property of the object changes. |
| Object:IsA | boolean | Returns true if an object's class matches or inherits from a given class. |
| Object:isA | boolean |
IKControl:GetChainCount
Returns the number of segments in the IK chain, meaning the number of parent-child links between the ChainRoot and the EndEffector. A chain of three parts has a count of 2.
The chain always has one more node than it has segments, so the valid indices for GetNodeWorldCFrame() and GetNodeLocalCFrame() range from 1 to the returned count plus 1. This returns 0 when the IKControl doesn't resolve to a valid chain, such as when its required properties aren't set.
Returns
| Type | Description |
|---|---|
| int | The number of segments in the chain, or 0 if the chain isn't valid. |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["Animation"] |
IKControl:GetChainLength
Returns the total length of the IK chain in studs, computed as the sum of the world-space distances between each consecutive part from the EndEffector up to the ChainRoot. This is the maximum reach of the chain: a Target placed farther than this distance from the chain's base can't be reached, and the chain extends toward it as far as it can.
This returns 0 when the IKControl doesn't resolve to a valid chain, such as when its required properties aren't set.
Returns
| Type | Description |
|---|---|
| float | The combined length of the chain in studs, or 0 if the chain isn't valid. |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["Animation"] |
IKControl:GetNodeLocalCFrame
Returns the CFrame of the node at the given index in the solved IK chain, relative to its parent node. Nodes are ordered from the ChainRoot at index 1 to the EndEffector at GetChainCount() plus 1.
This reflects the pose most recently produced by the solver. Use GetNodeWorldCFrame() for the same node in world space. If the index is outside the valid range, or the IKControl hasn't resolved a valid chain, this returns the identity CFrame.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| index | int | The 1-based position of the node in the chain, from 1 (the ChainRoot) up to GetChainCount() plus 1 (the EndEffector). |
Returns
| Type | Description |
|---|---|
| CFrame | The node's CFrame in the local space of its parent node, or the identity CFrame if the index is out of range or the chain hasn't been solved. |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["Animation"] |
IKControl:GetNodeWorldCFrame
Returns the world-space CFrame of the node at the given index in the solved IK chain. Nodes are ordered from the ChainRoot at index 1 to the EndEffector at GetChainCount() plus 1.
This reflects the pose most recently produced by the solver. Use GetNodeLocalCFrame() for the same node relative to its parent. If the index is outside the valid range, or the IKControl hasn't resolved a valid chain, this returns the identity CFrame.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| index | int | The 1-based position of the node in the chain, from 1 (the ChainRoot) up to GetChainCount() plus 1 (the EndEffector). |
Returns
| Type | Description |
|---|---|
| CFrame | The node's world-space CFrame, or the identity CFrame if the index is out of range or the chain hasn't been solved. |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["Animation"] |
IKControl:GetRawFinalTarget
Returns the CFrame that the solver aims the EndEffector at on the current frame, before SmoothTime smoothing is applied. This is the Target after Weight, Offset, and EndEffectorOffset are factored in. For a LookAt Type, it's the world position the chain is oriented toward.
Compare with GetSmoothedFinalTarget(), which returns the same target after smoothing. The two are equal when SmoothTime is 0.
Returns
| Type | Description |
|---|---|
| CFrame | The final target CFrame, in world space, before smoothing. |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["Animation"] |
IKControl:GetSmoothedFinalTarget
Returns the CFrame that the solver aims the EndEffector at on the current frame, after SmoothTime smoothing has been applied to the raw target from GetRawFinalTarget(). Smoothing uses a critically damped spring that eases toward the raw value over roughly SmoothTime seconds.
Because SmoothTime defaults to 0.05, this value trails GetRawFinalTarget() slightly while the target moves. When SmoothTime is 0, this returns the same CFrame as GetRawFinalTarget.
Returns
| Type | Description |
|---|---|
| CFrame | The final target CFrame, in world space, after smoothing. |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["Animation"] |
Events
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.AncestryChanged | Fires when the Instance.Parent property of this object or one of its ancestors is changed. | |
| Instance.AttributeChanged | Fires whenever an attribute is changed on the Instance. | |
| Instance.ChildAdded | Fires after an object is parented to this Instance. | |
| Instance.childAdded | ||
| Instance.ChildRemoved | Fires after a child is removed from this Instance. | |
| Instance.DescendantAdded | Fires after a descendant is added to the Instance. | |
| Instance.DescendantRemoving | Fires immediately before a descendant of the Instance is removed. | |
| Instance.Destroying | Fires immediately before (or is deferred until after) the instance is destroyed via Instance:Destroy(). | |
| Instance.StyledPropertiesChanged | Fires whenever any style property is changed on the instance, including when a property is set to nil. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.Changed | Fires immediately after a property of the object changes, with some limitations. |