Roblox Smooth Turning problem


I am currently working on a simple VR engine for one of my games. I am adding smooth rotation to the game.

The problem I’m facing while working on my game is the hands won’t follow my head.
Here is the code.

		local LHandCFrame = vrs:GetUserCFrame(Enum.UserCFrame.LeftHand)
		local RHandCFrame = vrs:GetUserCFrame(Enum.UserCFrame.RightHand)
		

		local LeftHandCFrame = CFrame.new(cam.CFrame.Position) * CFrame.new((LHandCFrame.p - headCFrame.Position)*headScale) * CFrame.Angles(0, math.pi*turning_rot, 0) * CFrame.fromEulerAnglesXYZ(LHandCFrame:ToEulerAnglesXYZ())

		local RightHandCFrame = CFrame.new(cam.CFrame.Position) * CFrame.new((RHandCFrame.p - headCFrame.Position)*headScale) * CFrame.Angles(0, math.pi*turning_rot, 0) * CFrame.fromEulerAnglesXYZ(RHandCFrame:ToEulerAnglesXYZ())

Any help would be appreciated!

The problem is that you are applying the rotation math.pi*turning_rot to the hands too. This is why the hand isn’t aligned with the head. Remove the rotation from the hand, and it should work.