Rotating Character based on it's move direction

I’m making a jetpack right now and I want the player to rotate in the direction they are moving while they are flying. An example could be if the player is holding w, then the player will rotate forward.

I can’t figure how to do this since the character rotates back standing up. Another issue is that I can’t find a good way to do this.

I know that the script for rotating the player should be within my code here:

task.spawn(function()
			while mouseDown == true do
				local upDirection = char:GetPivot().UpVector 
				
				task.wait()
				linearVelocity.VectorVelocity = upDirection * linearVelocity.MaxForce
			end
		end)