How do i apply inverse kinematics to my current arm movement?

I’m trying to get the player’s arm to follow the item that is grabbed. It is made however, it’s not the best i was wondering how would i be able to make it look nicer by perhaps making the elbow bend too and when the arm retracts it’s a smooth transition?

https://gyazo.com/b81477ccc0dfe1645ecb4de1782cae3f

The CFrame math:

local RightCFrame = CFrame.new((UpperTorso.CFrame * RightC0).p, _G.Item.Parent:GetPrimaryPartCFrame().p) * CFrame.Angles(math.rad(90), 0, 0)
RightShoulder.C0 = UpperTorso.CFrame:ToObjectSpace(RightCFrame)
2 Likes

Look up inverse kinematics if you want the elbow to bend too. Here’s a really nice guide that includes a place file that is probably exactly what you’re looking for: 2 Joint 2 Limb Inverse Kinematics

1 Like

I tried to understand it but i’m completely lost if im being honest, there’s too much i don’t know and i have no idea on how i would implement it into my script. Thanks for the thread though, i’ll keep trying

1 Like

This is a pretty good introductory video to IK: https://www.youtube.com/watch?v=UNoX65PRehA

2 Likes