Top down camera script shaking

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

Are you sure this is the only script that is manipulating your camera?

1 Like

yes and it is in startercharacterscripts

1 Like

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.

try using game.Workspace.CurrentCamera instead

i’ll try that as soon as i get back on my computer!

how can i apply this to the script?

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.

i deleted some stuff and i guess something was messing with the script

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.