So like the question says, I'm trying to get BodyGyro to only rotate in the X and Z axis in the direction of mouse.hit. Right now I have a loop that rotates my "engine" (Just a part) on the y axis. This line of code appears in a loop while "D" is held down on the keyboard:
engine.BodyGyro.cframe = engine.CFrame*CFrame.Angles(0,-.3,0)
I have one for the opposite direction when A is held. Then I have another line of code while I'm holding my mouse button 1 down:
engine.BodyGyro.cframe = mouse.Hit
How would I have mouse.Hit's X,Z rotational cords affect BodyGyro's cframe in the X,Z direction?