How could I make your arms and head follow your mouse up and down?

I managed to cloned left shoulder and right shoulder welded and parented to the head and make the neck move up and down by the camera with RunService.RenderStepped also use RunService.Stepped to update the animation from the real joint to fake joint
Put this script in StarterCharacterScripts

--R6 Only
local RunService = game:GetService("RunService")

local camera = workspace.CurrentCamera
local character = script.Parent

local torso = character:WaitForChild("Torso")
local head = character:WaitForChild("Head")

local rightShoulder = torso:WaitForChild("Right Shoulder")
local leftShoulder = torso:WaitForChild("Left Shoulder")
local neck = torso:WaitForChild("Neck")

local rightShoulderCopy = Instance.new("Motor6D")
rightShoulderCopy.C0 = CFrame.new(1.5, -1, 0) * rightShoulder.C0.Rotation
rightShoulderCopy.C1 = CFrame.new(0, .5, 0) * rightShoulder.C1.Rotation
rightShoulderCopy.Part1 = rightShoulder.Part1
rightShoulderCopy.Name = "RightShoulderCopy"
rightShoulderCopy.Archivable = false
rightShoulderCopy.Part0 = head
rightShoulderCopy.Parent = head

local leftShoulderCopy = Instance.new("Motor6D")
leftShoulderCopy.C0 = CFrame.new(-1.5, -1, 0) * leftShoulder.C0.Rotation
leftShoulderCopy.C1 = CFrame.new(0, .5, 0) * leftShoulder.C1.Rotation
leftShoulderCopy.Part1 = leftShoulder.Part1
leftShoulderCopy.Name = "LeftShoulderCopy"
leftShoulderCopy.Archivable = false
leftShoulderCopy.Part0 = head
leftShoulderCopy.Parent = head

rightShoulder.Enabled = false
leftShoulder.Enabled = false

RunService.RenderStepped:Connect(function()
	neck.C0 = CFrame.new(0, 1.5, 0) * CFrame.Angles(math.asin((camera.Focus.Position - camera.CFrame.Position).Unit.Y), 0, 0)
	neck.C1 = CFrame.new()
end)

RunService.Stepped:Connect(function()
	rightShoulderCopy.Transform = rightShoulder.Transform
	leftShoulderCopy.Transform = leftShoulder.Transform
end)

workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function()
	local _camera = workspace.CurrentCamera
	if _camera then
		camera = _camera
	end
end)

Hope this fixed for you

1 Like