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

How to disable a player from zooming out?

Can anyone help me with disabling a players ability to zoom out other wise first person only?

1 answer

✓ Accepted answer

This can be achieved using the properties of the camera and the player. If you don't want them to zoom out, you can lock their camera at a certain zoom by setting the Min and Max zoom to the same number.

In a LocalScript:

local player = game.Players.LocalPlayer
player.CameraMinZoomDistance = 15
player.CameraMaxZoomDistance = 15

To lock in first person, you would set the camera mode. Also in a LocalScript:

local player = game.Players.LocalPlayer
player.CameraMode = Enum.CameraMode.LockFirstPerson

Hope this helped!

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