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

How to keep gui size the same on other screens?

Searched the already on google but could not find any good solutions for me.

2 comments

1

royaltoe in easier words: UDim2.new(number,0,number,0) instead of UDim2.new(0,number,0,number) for all gui's

0

in position and size?

Edit: nvm its both i figered out thanks for you help!

1 answer

✓ Accepted answer

Use scale instead of offset. You can use the built in emulator to test the size across devices.

Example: what greatneil80 said: UDim2.new(number,0,number,0) instead of UDim2.new(0,number,0,number) will use scale instead of offset. Scale goes by percentage of it's parent. So if we were trying to tween a frame inside a gui to 50% of the screen size, we'd do:

script.Parent.Frame.Size = UDim2.new(.5, 0, .5)

same goes for position.

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