How to use Align Orientation or Angular Velocity to keep ONE orientation axis constant

I’m making a helicopter, and it works fine except it rolls side to side and eventually crashes. I tried to use Align orientation to keep the roll axis constant, but it seems that align orientation only allows you to keep 2 or 3 axis constant. I also tried Using Angular Velocity along with a script to fix it but it doesn’t seem to work.

I’ve searched some solutions on the devforum but either cant seem to understand it or its not suitable for my situation. I dont want to constantly set the orientation of the helicopter because it makes it really glitchy.

Currently i have a code that makes the helicopter rotate up or down and left or right. The code is shown below:

AimEvent.OnServerEvent:Connect(function(Player, MouseX, MouseY, screenSizeX, screenSizeY)
	local YawVelocity = (MouseX / (screenSizeX / 2)) * -1
	local PitchVelocity = (MouseY / (screenSizeY / 2)) * -1
	RotateVelocity.AngularVelocity = Vector3.new(PitchVelocity, YawVelocity, 0)
	
end)

I tried to put -Heli.PrimaryPart.Rotation.z in as the z parameter in the last line of code, but it dosent seem to work. Any help is appreciated. Thank you in advance.

1 Like