Choppy Player Movement

i have a script, everything works but when the player moves backwards or side to side it can be a lil choppy

local cam = game.Workspace.CurrentCamera
local RunService = game:GetService("RunService")
local char = script.Parent
local hum = char:FindFirstChild("Humanoid")

local UIS = game:GetService("UserInputService")

RunService.RenderStepped:Connect(function ()
	UIS.MouseBehavior = Enum.MouseBehavior.LockCenter
	if hum.Sit == true then return end
	hum.CameraOffset = Vector3.new(3,1,0)
	local x, y, z = cam.CFrame:ToOrientation()
	local currentPosition = char.HumanoidRootPart.Position
	local newCFrame = CFrame.new(currentPosition) * CFrame.Angles(0, y, 0)

	char.HumanoidRootPart.CFrame = char.HumanoidRootPart.CFrame:Lerp(newCFrame, 1)
end)

Could you provide some context on what the script is meant to do?
Video of the player being “choppy” could also be helpful.

From what I can guess, the issue is probably that the change in the player’s CFrame sometimes causes a change in the player’s camera location, which would then cause another change in the player’s CFrame and so on.

1 Like