R6 Inverse Kinematics

Hello! robert_stevey here. I wanted to contribute to the community by releasing this module I have been working on for a bit.

I introduce you to…

R6 Inverse Kinematics Module

This is a module that solves Inverse Kinematics problem on the limbs of an R6 rig. Now what differentiates this module from other Inverse Kinematics modules is that it simulates what a 2 joint solver on an R6 rig. Dont get it? Well here is a demo of it:

All of this is inspired by BlackShibe in his “Writing FPS Framework, Part 2”


You can get the source of the module here
R6IK.rbxm (4.1 KB)

Oh and if you are interested, here is a github for it which includes a documentation too

I hope this can help others.


Thank you so much for this. It works perfectly!


Where do I put it the module script?


Anywhere you would like!, though I recommend you to put it under ReplicatedStorage for shared access.


This didn’t get alot of recogonition, Just wanna tell you, you did a amazing job on this! :smile:


Awesome module! Do you have a reference to the underlying algorithm at work here?


Thank you, the algorithm I used here is the same as what was used in this post: 2 Joint 2 Limb Inverse Kinematics


Thank you, I do remember coming across this post some time ago and I was never able to resurface it for some reason! I’ve been using this module to implement a climbing system, which is coming along pretty nicely.


is there a way to disable rotation on the Z axis?
currently working on procedural walk animations and it looks really weird on the legs

1 Like

Pretty good.
me likey
good job

1 Like

This is a really good and useful module.

Quick question though: There is a dynamicsound module in the github alongside the R6IK folder. Is that also for open-source?

1 Like

Yep it is! all things that I open sourced for Roblox related projects are placed in the repository!

P.S. if you’re interested in the dynamic sound module here is a post about it

1 Like

i have an r6 startercharacter and i inserted this script inside it, it isnt working. can you help me?

Did you only insert it without requiring it and using it like a module? I’m not sure what’s the problem here

When i use it the player’s arm starts flying off into the sunset.


–Some Localscript
local Remote = game:GetService(‘ReplicatedStorage’).Remotes.Grapple
local Plr = game.Players.LocalPlayer
local Mouse = Plr:GetMouse()
local uis = game:GetService(‘UserInputService’)

while task.wait() do
if uis:IsKeyDown(Enum.KeyCode.Q) then

–Some ServerScript
local Remote = game:GetService(‘ReplicatedStorage’).Remotes.Grapple
local R6IK = require(game:GetService(‘ReplicatedStorage’).Modules.R6IK)

Remote.OnServerEvent:Connect(function(Plr, MouseHit : Vector3)
if Plr.Character then
local IK = R6IK.New(Plr.Character)
IK:ArmIK(‘Left’, MouseHit)

It flies off into the sunset once you press E. It works for the legs but not the arms

I see the problem here, I should have stated this before but you must use the .New function Once and not every time you want to do IK.

So to fix your code, here is the solution that I found. (Server script)

local Remote = game:GetService("ReplicatedStorage").Remotes.Grapple
local Players = game:GetService("Players")
local R6IK = require(game:GetService("ReplicatedStorage").Modules.R6IK)

local PlayerInfo = {}

		PlayerInfo[Player] = {IK = R6IK.New(Player.Character)}

Remote.OnServerEvent:Connect(function(Plr, MouseHit : Vector3)
	if Plr.Character then
		local IK = PlayerInfo[Plr].IK
		IK:ArmIK("Left", MouseHit)

Can you give a sample of using this for footplanting pls
I can’t figure out a way for ik to be compatible with my walking animations

That is up to you to implement, I haven’t done any footplanting code which includes this module yet. I might do it in the future but im not sure

1 Like

I keep getting a buffing error while opening the game, are you able to link a model?