So I have a really basic script here that is supposed to limit the max distance a character can zoom out, and it works as expected in studio but it does nothing when I'm in an actual game. The script is located under Workspace and is not a local script, just a regular server script.
Here is the script, it's literally 2 lines.
wait(0.1) game:GetService("Players").LocalPlayer.CameraMaxZoomDistance = 10
You cannot use "LocalPlayer" using a Server-Script. I recommend changing it to a LocalScript and putting the script under "StarterGui"
If you want to keep it in a server-script, change the code to:
game:GetService("StarterPlayer").CameraMaxZoomDistance = 10