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

I can't seem to get my gui to scale properly, why is that?

I can't seem to get my gui to scale properly when it's displayed on a mobile device, like the gui looks big on mobile device, and it won't resize itself. I don't know how to fix this, I've looked everywhere.

I have a open source game where the gui is in, here's the link: https://www.roblox.com/games/1821768889/gui

please take a look and see what I'm doing wrong.

1 comment

0

May I see your updated code and the output. I need to know how you imputed those numbers. Thanks in advance.

1 answer

✓ Accepted answer

This is one of the most common problems when creating a GUI. I can see that you have inputed both scale and offset for this. Now that is exactly the problem.

Let me explain in an example. Say I am playing in a Computer. Now, my Computer is a big screen. It could be different from yours. You used the value 1, -170, 1, -180 What I would do rather in a situation like this to strictly stick with the scale values, as they resize on all devices.

Consider changing to the following layout.

  • 0.9, 0, 0.75, 0 --I suggest you play around with this number. Don't put a single number in the offset and you will surely see the change.

Study More

Read through the list. There are definitely helpful features in Gui such as AnchorPoints and etc.

2 comments

0

Oh, I didn't know that. Thanks! But now I have a new issue... The gui won't stay on the far right side of the screen if the window is resized.

0

Never mind, it was a mistake on my end. I forgot to use just scale on the size.

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