GUI Position glitches

hey, i hope this post belongs in here, i couldn’t find a category that fully matches this problem so i guessed this is the most fitting.

anyways, i’m having a problem with my gui. sometimes, when i start my game, the gui positions itself a bit further to the right, even though it should be fully centered. when i click a button in the frame that appears later, the gui correctly positions itself again.

Perhaps it’s worth mentioning that i use scale and not offset, so that shouldn’t be the problem.

small edit: It also does this in Studio, but when I change something on it it also centers itself again.

1 Like

im still looking for a solution

I use this plugin for positioning and scaling GUIs: AutoScale Lite - Roblox
Hope that helps!

1 Like

I’ve tried to use that, but when I add a constraint the gui doesn’t cover the whole screen on other devices.

You can try these 2 Methods:

  1. Click on the Phone/Tablet Icon on the Right corner of the Display. Set up all the Setting as Displayed here:


    Drag now the Frame etc. in the right position

  2. Instead of using “Offset” for the position or Size, use “Scale”.
    Screenshot 2021-11-04 172957

Can you show an example of when it doesn’t cover the full screen?

I’m already using Scale instead of offset, and if I reposition the gui on another device it would ruin the position on the other devices again.

Sure.

This is with the constraint on PC, looks normal.

But when I switch over to mobile, it looks like this. (This is an iPhone XR btw)

When you use the plugin, do you use add constraint or unit conversion?

I use Add Constraint.

(why is there a char limit aa)

Try deleting the constraint and using unit conversion. Make sure you use scale for both position and size instead of offset.

there is a setting where you set something to relitive YY, that always works

Both are on scale, clicked scale in the plugin just to be sure.

Now it does fit, but I don’t know if it fixes the bug since it was on scale before too.

I think you’re talking about SizeConstraint, when I set it to RelativeYY the gui moves to the left, and it still resizes on other devices with the constraint. Also it has different sizes depending on the device without it.

Well, I tried fixing it by changing each SizeConstraint upon loading the game and then changing it back to the original SizeConstraint.

In each play test the GUI was in the normal position, but it still moves in Studio.

So, it’s basically fixed, but if someone knows why it also happens in Studio, an answer is appreciated!

I have the same problem, it happens so randomly and I still don’t know how to fix it or whats the problem. It could be a studio bug but I’m unsure.