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

How do you force the player to zoom out his/her camera?

Asked by 5 years ago
Edited 5 years ago

My game needs a script (Or a LocalScript if necessary...) that would force the player to zoom out his/her camera to a certain (Not all the way out) point. Thanks in advance.

0
There used to be an old way to do this, where if the player was in 1st person mode a GUI would cover their screen telling them to zoom out. Just something to try out. DeceptiveCaster 3761 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

In StarterPlayer there exists CameraMinZoomDistance and CameraMaxZoomDistance. You can edit these via LocalScript on the fly if need be.

These two values can be edited to dictate how far out the player can zoom their camera and how far in the player can zoom their camera. Might be what you're looking for.

To zoom a player's camera out to a certain distance, you can set CameraMinZoomDistance and CameraMaxZoomDistance to the same value via LocalScript to lock the player's camera at a certain distance before changing both back to their normal values.

0
Thank you! SuperPoopyPoopPoop 21 — 5y
Ad

Answer this question