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

How do I prevent player from zooming out to see the whole playing field?

Asked by 6 years ago

I like the default camera behavior for my game, with one exception. I don't want the player to be able to zoom out. Can I prevent this by simply limiting the height of the camera relative to the humanoid somehow? Thank you.

3 answers

Log in to vote
-1
Answered by 6 years ago

I attempted doing this with the Camera in my game, and I could definitely tell you what not to do.

a) Programmatically zooming in the camera when it is above the limit doesn't work the way you might want it to because it is a very messy method of doing things and can often end up with the camera stuck zooming all the time.

b) The properties Player.CameraMaxZoomDistance and Player.CameraMinZoomDistance doesn't work, so that's out of the question.

c) Setting the zoom to a certain distance from the player when it goes past the Max turns out to be really choppy, and annoying when trying to play a game.

The best and probably easiest (maybe even laziest) method of accomplishing this that I have found out is to create a ZoomInScreen GUI when the player passes the Max limit. In other words, a GUI that pops up telling the player to zoom back in.

This is how many games probably do it (I can think of Apoc Rising off the top of my head) and probably the most efficient solution I have found yet.

2
max zoom and min zoom definitely work. User#17125 0 — 6y
0
the max zoom worked great. thank you. buffalojump -3 — 6y
0
Oh, the Camera Zoom Distance properties work now? They were deprecated when I tried them. Wow, go Roblox. denfeet 9 — 6y
Ad
Log in to vote
1
Answered by
H4X0MSYT 536 Moderation Voter
6 years ago

Ok these people are idiots. There is a service which I believe is called Starterplayer. Click on it while in studio. There should be options for maxCameraDistance etc. These control the camera.

0
Thank you. CootKitty 311 — 6y
Log in to vote
-1
Answered by 6 years ago

There is a camera zoom property in the workspace. Edit that to whichever radius you like.

This HAS to be edited via script.

0
It isn't a property of workspace and you don't need a script to set it. CootKitty 311 — 6y

Answer this question