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

How do I change the limit of the zooming?

I'm working on a FPS game, I just made a weapon selection, but the FPS script I currently added does not let players click the class rank they want to use.

Here's the FPS GUI script I use:

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

I couldn't find anything on the Roblox wiki, can it be scripted with the script above?

2 answers

You could wait until they select their class to change the camera mode.

Most commonly by using Player.CameraMinZoomDistance and/or Player.CameraMaxZoomDistance. I've heard this is still glitchy, so please be aware it might not work due to roblox. Also, I've heard this does not work in studio mode, and put it inside a LocalScript

game.Players.LocalPlayer.CameraMinZoomDistance = 0 --Put the Minimum amount the player can zoom in here
game.Players.LocalPlayer.CameraMaxZoomDistance = 0 --Put the Maximum amount the play can zoom here

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