How to rotate a motor6 to match the camera's vertical direction?

I suck at math and try as I might I can’t figure out how to get the number I need

I want to change the orientation of a motor6 to rotate the character to face in the vertical (up/down direction) that the camera is looking. I only want the number to adjust that 1 axis, so that as the player looks up and down the character’s motor6 updates to aim up/down to match the camera. I know how to set the CFrame I just don’t know how to get the number representing the up/down angle of the player’s camera

WOWOWOWOWOO i found it

my code:

	local lookVec = Camera.CFrame.LookVector
	local ang = math.asin(lookVec.Y) -- in radians
	RootJoint.C0 = CFrame.new(RootJoint.C0.Position) * CFrame.Angles(ang, 0, 0)

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