Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Preventing camera from zooming out super far?

How would I prevent the camera from zooming out really far in-game? I only want a client to be able to zoom out a certain amount of distance before the camera stops zooming out.

Thanks.

2 answers

Use the CameraMaxZoomDistance property of the player. Here's a script I literally just made.

game.Players.PlayerAdded:connect(
function(Player)
	Player.CameraMaxZoomDistance = 20 -- They can only zoom out 20 stud (You can change this number to any number under 400)
end
)

Put in localscript

game.Players.PlayerAdded:connect(function()
wait(2)
game.Workspace.CurrentCamera.FieldOfView = 60 --Desired amount here
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.