What do you want to achieve? Keep it simple and clear!
I’m making a 3rd person gun system. I got a problem while i was testing if the camera works propertly. I noticed the arms weren’t moving up and down relative to the camera movement. How can i fix this issue?
What is the issue? Include screenshots / videos if possible!
I just can’t figure out how to manipulate the shoulder joint CFrame in a way, so the characters arms rotate up and down while pointing at the mouse.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I read multiple posts about the arms following the cursor, but they were either for R6 or just wouldn’t work like I wanted.
Here’s a snippet from one of my older games. This rotates the arms along with the head.
local runService = game:GetService("RunService")
local camera = game.Workspace.Camera
local remoteEvent = game.ReplicatedStorage:WaitForChild("ArmRotation") --This is just used to replicate the movements to the server
local character = script.Parent
local player = game.Players.LocalPlayer
local leftMotor6 = character:WaitForChild("LeftUpperArm"):WaitForChild("LeftShoulder")
local rightMotor6 = character:WaitForChild("RightUpperArm"):WaitForChild("RightShoulder")
local headMotor6 = character:WaitForChild("Head"):WaitForChild("Neck")
runService.RenderStepped:Connect(function()
leftMotor6.C0 = CFrame.new(leftMotor6.C0.Position) * CFrame.Angles(camera.CFrame.LookVector.Y, 0, 0)
rightMotor6.C0 = CFrame.new(rightMotor6.C0.Position) * CFrame.Angles(camera.CFrame.LookVector.Y, 0, 0)
headMotor6.C0 = CFrame.new(headMotor6.C0.Position) * CFrame.Angles(camera.CFrame.LookVector.Y, 0, 0)
remoteEvent:FireServer(character, camera.CFrame.LookVector.Y) --Same explanation
end)