Zoom in/out on scrolling frame

I’ve seen you around the forum, and you seem like a pretty cool guy. I know how it feels to get a post ignored, so I feel for you not getting a response for five days. Hopefully, you found a solution by now.

But if you haven’t, I’ve had a problem similar to this, and I found a pretty simple (but kind of hacky) workaround to creating the illusion of zoom: parenting the contents of the ScrollFrame to a giant, invisible (regular) frame and then binding the size of said invisible frame to some sort of user input. ScrollFrames has a property called AutomaticCanvasSize, so if you switch that from None to XY, the scrolling size will adapt to the size of the frame. And batta bing, batta boom, you got yourself a zooming system! The only caveat to this is that any content inside of the scrollable frame (so the blocks in your case) have to be sized using Scale, NOT Offset! Otherwise, the content won’t scale with the invisible frame, and everything will break. You could apply that to make it so there’s always a minimum zoom, but I’d rather do it through code than through offsets.

If you want to bind something like a scroll wheel to this without moving Roblox’s cameras (like me), then there’s another Dev thread that tells you how to disable camera zoom.

Hope this helps :slight_smile:

3 Likes