How would I get the player's arms to rotate with the camera?

I am making a third person gun camera system, and I am having issues making the arms rotate with the camera. The head rotates just fine but it’s the arms that are having issues.

Code:

local function updateLimbs()
	local cameraDirection = script.Parent.HumanoidRootPart.CFrame:ToObjectSpace(cam.CFrame).LookVector
	local offsetAngles = CFrame.Angles(-math.asin(cameraDirection.Y), math.asin(cameraDirection.X), 0)
	neck.C1 = CFrame.new(originalNeckC1.Position) * offsetAngles
	rightShoulder.C1 = CFrame.new(originalRightArmC1.Position) * offsetAngles
	leftShoulder.C1 = CFrame.new(originalLeftArmC1.Position) * offsetAngles
end

What I want it to look like (Blackhawk Rescue Mission 5):

What it actually looks like:

I want the arms to follow the camera not the mouse, and I’ve tried searching for this thing but all I get is stuff that follows the mouse or viewmodels. I am not looking for either of those, but any help is appreciated. Thanks!

2 Likes

Blackhawk uses viewmodels. Why can’t you use viewmodels in your game?

It’s not a first person game. It’s going to be a third person game, and how does it use viewmodels?

1 Like

Yeah, which is why I used that as showcase. My game isn’t going to be first person, so viewmodels wouldn’t work and it would be even more complicated to get it synced with the character’s position.

Do you know how CFrame works? Maybe try using that.

1 Like

Oh set the C0 properties instead of the C1 properties

1 Like

That actually worked. I feel like an idiot right now, I was going through all of this trouble and all I needed was to change a single character. Thanks for the help! I appreciate it.

3 Likes