How can I level a moving object

Hello I want to try to level which makes it straight and I am trying to do that to a plane

I tried nothing because I found nothing online

if you need more info feel free, and thanks for the help

So I am assuming you mean Leveling out a Model witch can be done by simply setting its CFrame to a pre Determined CFrame

An example of this is

local function LevelModel(Model)
	local ModelsPivot = Model:GetPivot()
	local LevelCFrame =,, ModelsPivot.LookVector.Y,0)) -- The 0 can be replaced to your models Z rotation


This is one of the ways you can level out your model

yeah it worked but it is leaning to the right

can you provide an image so I know how much it is turning