i need a script that doesnt allow the player to fully zoom in, in my game that im making when the player zooms all the way in it really messes everything up.
Funny how you don't need a script for this. In Studio, look in the StarterPlayer service. There are two properties: "CameraMinZoomDistance" and "CameraMaxZoomDistance." Change these to prevent people from zooming too far in / too far out.
You can do this 2 ways. Change the CameraMinZoomDistance in StarterPlayer. Or put this in the Workspace:
game.Players.PlayerAdded:Connect(function(p) p.CameraMinZoomDistance = 5 end)