local camera = workspace:WaitForChild("Camera")
local Player = game.Players.LocalPlayer
local Character = Player.Character
local HumanoidRootPart = Character.HumanoidRootPart
local distance = 16
local RunService = game:GetService("RunService")
camera.CameraType = Enum.CameraType.Scriptable
RunService.RenderStepped:Connect(function()
camera.CFrame = CFrame.new(HumanoidRootPart.Position + (HumanoidRootPart.CFrame.UpVector * distance)) * CFrame.Angles(math.rad(-90), 0, 0)
end)
the script works but i dont know why the camera is shaking
Try only updating it if Humanoid.MoveDirection.Magnitude > 0 instead of RenderStepped, since you must account for the character bobbing. If this does not work, check for any plugins that may be causing this and double check that there are not any scripts doing this.
I just copied and pasted your example script into studio and my camera does not bob. There must be some other script or something that moves the camera around a little bit.