I was making a script when I came across a problem. For some reason, CameraMaxZoomDistance only works half the time, but CameraMinZoomDistance works fine every time.

Test Local Script:

Player.CameraMaxZoomDistance = 10
Player.CameraMinZoomDistance = 10

wait(5)

Player.CameraMaxZoomDistance = 20
Player.CameraMinZoomDistance = 20

wait(5)

Player.CameraMaxZoomDistance = 30
Player.CameraMinZoomDistance = 30

the "Player.CameraMinZoomDistance = number" works every time, but Player.CameraMaxZoomDistance doesn't change half of the time, and its completely random. I tried my hardest from seeing if i spelled it wrong to seeing if there's another script conflicting with this, but there are none. What could be going on?

8 comments

0

I think because the MinZoomDistance is over writing it. Try changing the MaxZoomDistance to like 15 and see if it works. (Not Sure)

0

It's still acting the same way. The script follows the mindistance, but just ignores the maxdistance completely

0

hmmmm

0

let me open studio and test it....

0

For me works. You're putting the script in StarterGui right?

0

If i change to MaxZoomDistance to 15, it works for me. but if it is the same as the MinZoomDistance, it doesn't work. Im guessing it's because if the MinZoomDistance is 10 the player could only zoom 10 studs in and if the MaxZoomDistance is 10 the player could only zoom out 10 studs. So basically if i'm correct, the player max and min zoom distance is 10. Meaning they can't zoom in or out.

0

And also what yHasteeD said

0

I figured it out. Roblox forces the MaxDistance not to be changed if its under the MinDistance and viceversa. MaxDistance wont change because in the previous, it thinks mindistance is still higher