Zooming in on GUI objects

Hi, I’m currently making a plugin which uses a movable GUI frame.
The movement works like this: the parent of all the objects inside the GUI is something called “mover” (the black square in the video). When the mouse zooms in, this code runs:

mover.Size += UDim2.fromOffset(100, 100)
mover.Position += UDim2.fromOffset((mover.Position - UDim2.fromOffset(widget.AbsoluteSize.X / 2, widget.AbsoluteSize.Y / 2)).X.Offset / (mover.Size.X.Offset / 100), (mover.Position - UDim2.fromOffset(widget.AbsoluteSize.X / 2, widget.AbsoluteSize.Y / 2)).Y.Offset / (mover.Size.X.Offset / 100))

I need it to zoom into the centre of the screen, but it currently zooms slightly towards the mover.
Any help is appreciated.

2 Likes

I’m not sure how to fix the problem you are having, but this in its current state is exactly what I need right now. would you be able to make it public right now?

1 Like

Would you be able to explain what you mean by that?

1 Like