I need help figuring out how to properly CFrame the camera

When using VR the camera maintains a stationary position and your view is offset from the camera object so when I try to run the code below it acts as if it were being moved reletive to the world and not the way you are facing. I need help,

This is what happenes:
https://gyazo.com/74b36818b2b7877ed8c212105d1a1b8e

This is the code:

UIS.InputChanged:Connect(function(input)

  if input.KeyCode == Enum.KeyCode.Thumbstick1 then
  	Camera.CFrame = Camera.CFrame * CFrame.new(input.Position.X,0,0) * CFrame.new(0,0,-input.Position.Y)
  elseif input.KeyCode == Enum.KeyCode.Thumbstick2 then
  	Camera.CFrame = Camera.CFrame * CFrame.new(0,input.Position.Y,0)
  end	

end)

So, I’ve done some VR stuff in the past. I had this issue. The best solution I could find is setting the camera’s CFrame or position(I forgot which it was sorry) To the Position of the VR headset.

here is a script i made that requires head, right hand and left hand parts to be in the workspace

local VRService = game:GetService("VRService")
if VRService.VREnabled == true then
	workspace.hand1.Transparency = 1
	workspace.hand2.Transparency = 1
	workspace.chand1.Transparency = 0.65
	workspace.chand2.Transparency = 0.65
	workspace.CurrentCamera.CameraType = "Scriptable"
	wait()
	workspace.CurrentCamera.CFrame = CFrame.new()
	local InputService = game:GetService("UserInputService")
	VRService.UserCFrameChanged:Connect(function()
		local LeftHand = VRService:GetUserCFrame(Enum.UserCFrame.LeftHand)
		local RightHand = VRService:GetUserCFrame(Enum.UserCFrame.RightHand)
		local Head = VRService:GetUserCFrame(Enum.UserCFrame.Head)
		workspace.chand1.CFrame = (LeftHand)
		workspace.chand2.CFrame = (RightHand)
		workspace.vr.stuff:FireServer(RightHand,LeftHand,Head)
	end)
end

This Is local

function who(player, RightHand, LeftHand, Head)
	workspace.hand2.CFrame = (RightHand)
	workspace.hand1.CFrame = (LeftHand)
	workspace.head.CFrame = (Head)
end

script.stuff.OnServerEvent:Connect(who)

This is the server side code.

Please keep in mind that this is a year ago.

Why do people even find these very old posts in the first place? Do they go and purposely search for old posts or am I crazy?

Whoa, buster, clam down boah. A fellow programmer needs help, as a composer I would not expect you to understand but, man, have some empathy.

Dude, this post was over a year old when you replied. They probably won’t see it, or, if they do, it’s buried deep in their code/is already improved.

Please don’t necropost. If a post’s last reply is over a month or so, it’s wise to not reply ESPECIALLY if you’re just going to be telling someone off for bad scripting.

Well, Roblox sure do have a lot of work to do, sure do. Especially suggested topics, sure do. Go wine to them with your inane clucking