I have a easy script that makes my players hands follow the mouse for a first person shooter i’m working on. I only want the arms to move vertically.
What’s Happening:
Example:
I looked through various discussions on this site and scripterhelpers, but non worked or they didn’t work with what’s going on with my arm controlling.
SCRIPT:
local ArmLookVector = Arm.CFrame.lookVector
local ArmLookVector2 = Arm2.CFrame.lookVector
local HeadPosition = Head.CFrame.p
local Point = PlayerMouse.Hit.p
local Distance = (Head.CFrame.p - Point).magnitude
local Difference = Head.CFrame.Y - Point.Y
Shoulder2.C0 = Shoulder2.C0:lerp((Shoulder2OriginC0) * CFrame.Angles(-(math.asin(Difference / Distance)),(((HeadPosition - Point).Unit):Cross(ArmLookVector2)).Y, 0), .5 / 2)
Yes it is in a renderstep.That’s all you should need to see from the script.