How to make a character face the same direction of the camera only horizontally?

I want to rotate a bodygyro on the character to face the same direction as the player’s camera but ONLY on the left-right yaw

So as the camera looks left or right it rotates the character by altering their BodyGyro, but looking up/down with the camera does not affect the BodyGyro

Essentially the same as this, except I have to use the camera to modify a CFrame, not setting the orientation vector

1 Like

The other post quite literally has your answer, you just need to backtrack a step

local x, y, z = camera.CFrame:ToOrientation()
gyro.CFrame = CFrame.Angles(0, y, 0)

oh my god i see, ive been using :ToEulerAngles() for everything instead of :ToOrientation() :person_facepalming:

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