Thank you everyone for your support in trying to solve the issue, I finally found a formula which achieved the intended functionality. Here’s the Update_View function in case anyone was curious.
local function Update_View ()
local head:Part = assignedCharacter.Head
local torso:Part = assignedCharacter.HumanoidRootPart
local displayHead:Part = assignedCharacter.DisplayHead
local headCF = head.CFrame
if math.abs(forwardPressed) == 1 or alignTorsoWithHead == true then
torsoYaw = math.lerp(torsoYaw,viewportVector.X,Config.movement.torsoLerpAlpha)
end
torso.CFrame = CFrame.new(torso.Position) * torso.CFrame.Rotation:Lerp(CFrame.fromEulerAnglesYXZ(math.rad(torso.Orientation.X), math.rad(torsoYaw), math.rad(torso.Orientation.Z)), Config.camera.lerpAlpha)
--displayHead.CFrame = CFrame.new(headCF.Position) * displayHead.CFrame.Rotation:Lerp(CFrame.fromEulerAnglesYXZ(math.rad(viewportVector.Y), math.rad(viewportVector.X), 0), .3) old "gimbal locked" code.
displayHead.CFrame = head.CFrame * CFrame.fromEulerAnglesYXZ(math.rad(viewportVector.Y), math.rad(viewportVector.X - torsoYaw) , 0)
assignedCamera.CFrame = assignedEyes.WorldCFrame
end
Thank you all for your time!!!