How to make character face move direction without humanoid.AutoRotate?

How would I make character face the move direction relative to the camera like when humanoid.autorotate is on or like in this video at 16:50.

Here is what I tried
Control Module

local targetMoveVector =
local mainMoveVector =
local lX,lY,lZ = 0,0,0
local function lerp(a, b, c)
	return a + ((b - a) * c)

function ControlModule:OnRenderStepped(dt)
	if self.activeController and self.activeController.enabled and self.humanoid then
		-- Give the controller a chance to adjust its state

		-- Now retrieve info from the controller
		local moveVector = self.activeController:GetMoveVector()
		local cameraRelative = self.activeController:IsMoveVectorCameraRelative()

		local clickToMoveController = self:GetClickToMoveController()
		if self.activeController ~= clickToMoveController then
			if moveVector.magnitude > 0 then
				-- Clean up any developer started MoveTo path
				-- Get move vector for developer started MoveTo
				moveVector = clickToMoveController:GetMoveVector()
				cameraRelative = clickToMoveController:IsMoveVectorCameraRelative()

		-- Are we driving a vehicle ?
		local vehicleConsumedInput = false
		if self.vehicleController then
			moveVector, vehicleConsumedInput = self.vehicleController:Update(moveVector, cameraRelative, self.activeControlModule==Gamepad)

		-- If not, move the player
		-- Verification of vehicleConsumedInput is commented out to preserve legacy behavior,
		-- in case some game relies on Humanoid.MoveDirection still being set while in a VehicleSeat
		--if not vehicleConsumedInput then
		if cameraRelative then
			moveVector = calculateRawMoveVector(self.humanoid, (moveVector))

		local willJump = self.activeController:GetIsJumping() or (self.touchJumpController and self.touchJumpController:GetIsJumping())
		local player = game.Players.LocalPlayer
		local Character = player.Character
		local hum = Character.Humanoid
		local rootPart = Character.HumanoidRootPart
		local state = hum:GetState()
		local rx, ry, rz = Camera.CFrame:ToOrientation()
		if not JUMP_DIRECTION_FREEZE or (JUMP_DIRECTION_FREEZE and not willJump)  then
			if state ~= Enum.HumanoidStateType.Freefall  then
				targetMoveVector = moveVector
				--targetMoveVector =,moveVector.Y,moveVector.Z) 
		local mainMoveVector2 =
		if state ~= Enum.HumanoidStateType.Freefall  then
			mainMoveVector = lerp(mainMoveVector, targetMoveVector, math.clamp(dt * MOVE_ACCELERATION, 0, 1) )
			--mainMoveVector2 = lerp(mainMoveVector, targetMoveVector, math.clamp(dt * 3, 0, 1) )


		local X,Y,Z = mainMoveVector.X,mainMoveVector.Y,mainMoveVector.Z

		--print(X,Y,Z,"		",lX,lY,lZ)

		----set minimum value (otherwise your character will be sliding)
		if (X<lX and X>0 and X<MIN_VALUE) or (X>lX and X<0 and X>-MIN_VALUE) then
			X = 0
		if Y<lY and Y>0 and Y<MIN_VALUE or (Y>lY and Y<0 and Y>-MIN_VALUE) then
			Y = 0
		if Z<lZ and Z>0 and  Z<MIN_VALUE or (Z>lZ and Z<0 and Z>-MIN_VALUE) then
			Z = 0

		mainMoveVector =,Y,Z)
		lX,lY,lZ = X,Y,Z
		local TARGETANGLE = math.atan2(mainMoveVector.X,mainMoveVector.Z)
		if mainMoveVector.Magnitude >= 0.1 and rootPart then
			rootPart.CFrame =rootPart.CFrame:Lerp( * (CFrame.fromOrientation(0, math.rad(TARGETANGLE) * ry , 0)),dt)

		self.moveFunction(Players.LocalPlayer, mainMoveVector, false)

		-- And make them jump if needed
		self.humanoid.Jump = willJump
local Run = game:GetService("RunService")

local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local HRP = Character:WaitForChild("HumanoidRootPart")

local Camera = workspace.CurrentCamera

local function ManipCamera(Delta)
	Camera.CameraType = Enum.CameraType.Scriptable
	Camera.CFrame = * CFrame.Angles(0, math.rad(HRP.Orientation.Y), 0) *, 4, 8)

I could probably improve on this, let me know if you’d like me to.

Sorry I did not explain properly. I want the character to face left when the player is moving left and face right the player is moving right. I am trying to recreate humanoid.AutoRotate when it is on.

The script I provided does that, it moves the camera so that it’s facing in the direction of which the player’s character is moving in.

Not the camera, I want the character humanoidroot part to face the humanoid.Movedirection. Like how gta is when you are not aiming a gun

This is old but did you figure this out yet? I’m looking for the same solution as you

No I havent figured it out but I think they might have similar code in this bmx model.