How to get the RY axis of a CFrame?

Hello, I’m trying to set the RX axis of the players camera to 0 but to keep the other axises.
here is the code I tried doing:

		local CFra = CFrame.new(camera.CFrame.Position) * CFrame.Angles(0, camera.CFrame.YVector.Y, camera.CFrame.ZVector.Z)

I know that by doing CFrame.new() it will completely reset the CFrame.Angle. I entered the values of the other axises so they wouldnt be set to 0 (since remember I only want to set the RX axis to 0) but it acts really weirdly.

dsvvdvfewwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww

you get the RY axis of a CFrame via CFrame.Rotation.Y

please help

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.