So this script makes the player's head follow the mouse, and to simulate "realism", I put a "wait(0.034)", which is the approximate minimum time a wait can be. But the problem is, it's a bit choppy. I was thinking about reducing the choppiness by using a renderstepped:Wait(), but I have no clue how to do this, and it'd still be pretty choppy. So Here's the script:
local Player = game.Players.LocalPlayer
local Character = Player.CharacterAdded:wait() ; Character = Player.Character
local Torso = Character:WaitForChild'Torso'
local Neck = Torso:WaitForChild("Neck")
local Humanoid = Character:WaitForChild("Humanoid")
Humanoid.AutoRotate = false
local HMR = Character:WaitForChild("HumanoidRootPart")
local Mouse = Player:GetMouse()
local NeckC0 = Neck.C0
local NeckC1 = Neck.C1
game:GetService("RunService").RenderStepped:connect(function()
wait(0.034)
local cf = workspace.CurrentCamera.CFrame.lookVector.Y
local Kek = CFrame.Angles(0, 0, math.asin(Mouse.Origin.lookVector.Y))
Neck.C0 = NeckC0 * CFrame.Angles(math.asin(Mouse.Origin.lookVector.Y), 0, 0):inverse()
HMR.CFrame = CFrame.new(HMR.Position, Vector3.new(Mouse.Hit.p.x, HMR.Position.Y, Mouse.Hit.p.z))
end)
In line 15, you can see the wait I put. How can I tween this to make it smoother? Sorry if my wording isn't write, I've never actually used tweenservice before.

4 comments
instead of using the closest to the minimum, why dont you just use the minimum?
That makes an unnoticeable difference
You forgot to put Torso in parenthesis/brackets after WaitForChild on line 3.
That didn't make a difference