Make Camera ignore Y Axis

I would like to achieve a dashing system dependent on camera rotation, I have done the basics - however the dash keeps compensating its position for the Y axis, making the forward dash dependent on if the camera is facing down or up. Please explain the math included to me as I am a bit stupid. (facing straight forward) (facing down)

My code below -

	currentCameraOrbital ="Camera")
	currentCameraOrbital.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
	currentCameraOrbital.CameraType = Enum.CameraType.Scriptable
	currentCameraOrbital.CFrame = workspace.CurrentCamera.CFrame
	cameraVectorZ =, 0, currentCameraOrbital.CFrame.LookVector.Z)
	cameraVectorXLeft = * -1), 0, (currentCameraOrbital.CFrame.RightVector.Z * -1))
	cameraVectorXRight =, 0, currentCameraOrbital.CFrame.RightVector.Z)
1 Like