-- ClassName: LocalScript

local OFFSET = Vector3.new(-45, 45, 45)
local FIELD_OF_VIEW = 25

local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
local run = game:GetService("RunService")

camera.FieldOfView = FIELD_OF_VIEW

local function lookAt(pos)
  local cameraPos = pos + OFFSET
  camera.CoordinateFrame = CFrame.new(cameraPos, pos)
end

local function onRenderStep()
  local character = player.Character
  local primaryPart = character.PrimaryPart

  if character and primaryPart then
    lookAt(primaryPart.Position)
  end
end

run:BindToRenderStep("Camera", Enum.RenderPriority.Camera.Value, onRenderStep)

-- ClassName: LocalScript

local OFFSET = Vector3.new(-45, 45, 45)
local FIELD_OF_VIEW = 25

local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
local run = game:GetService("RunService")

camera.FieldOfView = FIELD_OF_VIEW

local function lookAt(pos)
  local cameraPos = pos + OFFSET
  camera.CoordinateFrame = CFrame.new(cameraPos, pos)
end

local function onRenderStep()
  local character = player.Character
  local rootPart = character:FindFirstChild("HumanoidRootPart")

  if character and rootPart then
    lookAt(rootPart.Position)
  end
end

run:BindToRenderStep("Camera", Enum.RenderPriority.Camera.Value, onRenderStep)

Fix the camera slightly bobbing along to the character
Fix the camera slightly bobbing along to the character

The character's PrimaryPart (its head) is animated, along with the rest of
the body, making the camera bob up and down slightly when the "breathing"
animation is playing.

It's hardly noticable, but definitly needs to be fixed. We're locking the
camera onto the HumanoidRootPart to fix this problem, as it remains static.
