Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how do i put a gui in the middle of the screen?

other people have different screen sizes, so if i put the gui in the middle of the screen for me, then for other people it will be off.

so changing the position normally is just useless.

3 comments

0

Make the position Udim2.new(.5,-(HalfSizeXOffset),.5,-(HalfSizeYOffset))

0

what is HalfSizeXOffset and HalfSizeYOffset?

0

half of the size's xOffset and yOffset

1 answer

✓ Accepted answer

This would work

Positon {0.5,-SizeXOffset},{0.5,-SizeYOffset}

SizeX/YOffset being 50% of the Size Offset.

For instance, if your frame's size is {0,20},{0,50}, it would be

Position {0.5,-10},{0.5,-25}

Edit:

If you work only with scale, you can use

Position {0.3,0},{0.3,0}

Size {0.4,0}, {0.3,0}

It's quite obvious how this works.

1 comment

0

thanks!! :D this worked

This discussion is preserved as it was. New answers, comments, and votes are closed.