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

How to make the position of a gui exact for every computer screen size?

Well i always see it in popular games like if you resize your window screen the gui stays in the same position of the screen, but for my game the gui doesnt stay put!!!! it's really important, and ive been needing to know for a long time.

1 comment

0

set its position to {0.5,0},{0.5,0} BUT change the two zeroes to negative and half the size of them.

2 answers

You use the Scale portion of the UDim2 for the Position property.

For example, this Frame will always be 25 pixels off from the lower right-hand corner:

local Frame = Instance.new("Frame", ScreenGui)--You'll have to define ScreenGui to actually use this code.

Frame.Size = UDim2.new(0, 50, 0, 50)
Frame.Position = UDim2.new(1, -75, 1, -75)

wiki.roblox.com/index.php/UDim2

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