Making a GUI tween into the center no matter what device

How do I make it so that if a button was pressed, the frame would move to the center no matter what device? I’m trying to make it accommodate any device.so that it doesn’t position itself in a weird way.

Please remember to answer the questions given to you when you first begin compiling the topic. Your topic is very under formed and does not give us a lot to work with.

How do I make it so that if a button was pressed, the frame would move to the center no matter what device? I’m trying to make it accommodate any device.

So you would first set the anchor point of the GUI in studio to:

0.5, 0.5

Then, you would set the position to:

0.5, 0, 0.5, 0

This will tween the GUI to the center.

@Eandvwigle there is enough info, he states that he wants the GUI to tween to the center.

2 Likes

you can get the Client’s ViewPort Size through

workspace.CurrentCamera.ViewportSize
-- the center of the screen is at 50% of the size in both diretions

Also see

1 Like