local RunService = game:GetService("RunService") local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local Camera = workspace.CurrentCamera -- Unique identifier to ensure we don't stack loops if executed multiple times local BIND_NAME = "AntiCameraShake_System" -- Disconnect any existing instances of this script pcall(function() RunService:UnbindFromRenderStep(BIND_NAME) end) -- Main stabilization logic local function stabilizeCamera() -- 1. Force the Humanoid offset to absolute zero local Character = LocalPlayer.Character if Character then local Humanoid = Character:FindFirstChildOfClass("Humanoid") if Humanoid and Humanoid.CameraOffset ~= Vector3.new(0, 0, 0) then Humanoid.CameraOffset = Vector3.new(0, 0, 0) end end -- 2. Strip rotational / positional shake offsets from the Camera CFrame -- This maintains your looking direction (LookVector) but neutralizes rapid jolts local currentCFrame = Camera.CFrame local position = currentCFrame.Position local lookAt = position + currentCFrame.LookVector -- Reconstruct a clean, unshaken CFrame Camera.CFrame = CFrame.new(position, lookAt) end -- Bind to RenderStep with a priority higher than the internal Roblox camera script (Enum.RenderPriority.Camera.Value is 200) -- This ensures our script gets the final say right before the frame renders. local highPriority = Enum.RenderPriority.Camera.Value + 10 RunService:BindToRenderStep(BIND_NAME, highPriority, stabilizeCamera) print("[Anti-Shake]: High-priority stabilization applied successfully.")