Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Preventing camera from zooming out super far?

Asked by 10 years ago

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

Log in to vote
2
Answered by 10 years ago

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
)
Ad
Log in to vote
0
Answered by 10 years ago

Put in localscript

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

Answer this question