How do I make it so that the camera's Y position matches the character's?
local player = game.Players.LocalPlayer
local camera = game.Workspace.CurrentCamera
local runService = game:GetService("RunService")
wait()
runService.RenderStepped:connect(function()
local character = player.Character
if character and character.UpperTorso then
local torso = character.UpperTorso
local newCameraPosition = Vector3.new(torso.Position.X, 5, 20)
camera.CoordinateFrame = CFrame.new(newCameraPosition)
end
end)
