How to make the camera not move up too much

How do you make the player’s camera not move up too much, I basically don’t want them to look above

You can restrict the maximum zoom distance of any given player with the following property.

https://developer.roblox.com/en-us/api-reference/property/Player/CameraMaxZoomDistance

Alternatively, I’ve made this local script which will snap the camera back if the distance between the character and the camera is greater than 50 studs.

local camera = workspace.CurrentCamera
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local hmr = character:WaitForChild("HumanoidRootPart")
local rs = game:GetService("RunService")

rs.RenderStepped:Connect(function()
	if math.abs(camera.CFrame.Y - hmr.CFrame.Y) > 50 then
		camera.CFrame = CFrame.new(camera.CFrame.X, hmr.CFrame.Position.Y + 50, camera.CFrame.Z)
	end
end)
2 Likes