I used the same video as the tutorial it is a while ago. The video is a great follow!
To save some time I tweaked it to work with the head and the waist as well.
However, works as well as moving/rotating arms in my opinion.
You can tweak it pretty easy to move/rotate arms later if you want or need to though
Hope this helps!
I added a waistSensitivity
variable that may need to be adjusted for specific needs.
(0 being unresponsive, to >1 being very responsive)
0.9 is what I use for my third-person system. For FPS you might want to set to 1.
I Haven’t tested this in FirstPerson.
Local Script inside StarterCharacterScripts
local camera = game.Workspace.CurrentCamera;
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local root = character:WaitForChild("HumanoidRootPart")
local neck = character:FindFirstChild("Neck", true)
local waistSensitivity = 0.9
local neckC0 = CFrame.new(0, 0.8, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1);
local waistC0 = CFrame.new(0, 0.2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1);
game:GetService("RunService").RenderStepped:Connect(function()
if neck and player.Character.Humanoid.Health > 0 then
local theta = math.asin(camera.CFrame.LookVector.y)
local neck = player.Character.Head.Neck;
local waist = player.Character.UpperTorso.Waist;
neck.C0 = neckC0 * CFrame.fromEulerAnglesYXZ(theta*0.5, 0, 0);
waist.C0 = waistC0 * CFrame.fromEulerAnglesYXZ(theta* waistSensitivity, 0, 0); --/<!!/ Where waistSensitivity is found
end
end)
Side Note:: This will only work for the client because of course it is a “Local Script” and sadly I haven’t even started the replication to the server-side yet for this script so your on your own there!
Edit: Added a fix: local character = player.Character or player.CharacterAdded:Wait()
since sometimes the “Neck” would error because the character was not fully loaded.