A gyro is a very useful thing to have if you are making ufo’s, or anything that involves flying, or shouldn’t tip over. Generally, there are very little solutions for this, so here’s one.
Model = (YourModel)
game:GetService('RunService').Heartbeat:Connect(function()
local AngleZ = -Model.PrimaryPart.Orientation.Z
local AngleX = -Model.PrimaryPart.Orientation.X
Model:PivotTo(Model:GetPivot() * CFrame.Angles(math.rad(AngleX), 0, math.rad(AngleZ)))
end)
We just counteract rotation on anything but Y by basically misusing the value of the z and x axises by themselves, making them 0. you can do this for any combination of axises, you just have to get their negative values and add them into the CFrame.Angles().