I have a script which changes the character’s waist and neck motors to make it appear as if the character is looking in the same direction as the camera. This however causes issues when equipping weapons as it will mess with the weapon’s idle animation and cause the gun to point in different directions depending on where you were looking before equipping a weapon.
This is the main calculation code for updating the Motor6Ds
local NeckC0 = Neck.C0:lerp(NeckOriginC0 * CFrame.Angles(-(math.atan(Difference / Distance) * 0.5), (((HeadPosition - Point).Unit):Cross(TorsoLookVector)).Y * 1, 0), 0.5 / 2)
local WaistC0 = Waist.C0:lerp(WaistOriginC0 * CFrame.Angles(-(math.atan(Difference / Distance) * 0.5), (((HeadPosition - Point).Unit):Cross(TorsoLookVector)).Y * 0.5, 0), 0.5 / 2)
I’ve tried resetting the C0s whenever the tool is equipped but that an unreliable fix that doesn’t always work as shown in the video.