local RunService = game:GetService("RunService") local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local Camera = workspace.CurrentCamera RunService.Heartbeat:Connect(function() local character = LocalPlayer.Character if not character then return end local rootPart = character:FindFirstChild("HumanoidRootPart") local humanoid = character:FindFirstChildOfClass("Humanoid") if not rootPart or not humanoid then return end if humanoid.MoveDirection.Magnitude > 0 then local currentSpeed = rootPart.AssemblyLinearVelocity.Magnitude if currentSpeed > 16 then local moveDirection = humanoid.MoveDirection rootPart.AssemblyLinearVelocity = Vector3.new( moveDirection.X * currentSpeed, rootPart.AssemblyLinearVelocity.Y, moveDirection.Z * currentSpeed ) rootPart.CFrame = CFrame.lookAt(rootPart.Position, rootPart.Position + Vector3.new(moveDirection.X, 0, moveDirection.Z)) end end end)