How can I prevent player from zooming in from a script?

Hello, I have been working on an egg hatching system and I want the player to be unable to zoom in when the egg is hatching, how do I do that from a client module script?
I tried this:

But it did not work.
Thank you!

2 Likes

Set the max zoom distance value to the same value of the min zoom distance

1 Like

So you probably want to reset the Player | Roblox Creator Documentation

2 Likes