I’ve been using this plugin to scale my text, on some devices it’s working but not on all of them. Which is not good because my game needs to support every device.
I’m not sure what i’m doing wrong here on the video:
I’ve been using this plugin to scale my text, on some devices it’s working but not on all of them. Which is not good because my game needs to support every device.
I’m not sure what i’m doing wrong here on the video:
You need to put the Texbox and the Button into a Frame, then add an UiAspectRatioConstraint only to this frame.
I’ll give that a try, thanks for the help. This is probably the issue thiough because I just came back to scripting after 4 months lol.
Wait do i also need to use the unit conversions for the frame too?
Okay so update I added a frame and added a UI aspect ratio constraint only to the frame but that didn’t work 100% I’ve kept messing around with the stuff but the UI wont fit on all devices.
Also something weird, when I don’t start the server the UI looks perfect but when I start it randomly moves.
Before starting server:
After starting server:
The same thing happens when testing the look on other devices too, its really annoying.
Since I’m not getting much support on this topic I’ll continue to script it first and focus on UI later.
Yeah, the use of the frame is primarily to keep the button and the text correctly aligned as well as avoiding any distorsion to them. Regarding the position issue, it arises from the UiAspectRatioConstraint
, which maintain the same frame shape instead of resizing it on larger screen sizes. Its anchor point keeps the frame in the same position, which leads to a slight misalignment with larger screen size. Personally, to fix this, I use a UiGridLayout
along with UiPadding
to ensure that the frame is always positioned correctly across all devices and screen sizes.
Here’s an example: ScaleGUI.rbxl (56.1 KB)
I’d imagine you’d need to check the properties if it is all in scale, also if you want it exact add UI Aspect ratio contrasts (idk if this’ll help I use the pro version)
nope its in the lite version as well. im pretty sure you need it in every button / frame thingy
I mean for scaling wise, not the aspect ratio
And do you have to scale the things inside the frame too?
Nevermind it worked, thanks so much for the help really appreciated.
Sorry but I need help again, I’ve tried using a different frame and whatever but the issue arises with the cell padding + cell size. I tried using the same properties as the one you showed me in the download for a new frame but it’s not working. For context I never scaled anything inside the frame.
You need to scale the position and size of everything. What’s the issue you’re facing exactly?
Before you answer that one more question, whenever you move a gui object do you have to rescale it again with the plugin button?
THe problem is the UI grid layout, cell padding + cell size
I used the same properties as the other frame, only this one is massive. It might be because I dont understand how to use padding + cell size so if you could please help me understand it that would be appreciated.
I think the padding has worked properly but the cell size probably not.
No, the plugin button only convert the Offset
Size or position of a gui object to Scale
. Once it is on scale only, there is no need to do it again unless you edit it manualy using offset values.
You don’t need to change the CellPadding
if you have a single frame, as the UiGridLayout
only serve to keep the frame and its childrens at the right position across all devices and screen sizes. About the CellSize
, you can change it to get the desired background frame size for your GUI.
The example i gave you in the RBXL studio file was a bit different, because there were no visible frame at the background, so i put the CellSize
to the maximum (1, 0, 1, 0)(frame was full screen), and its horizontal position was to center, and vertical position was to Bottom, because your code gui was at the center-bottom of the screen.
Here is a more accurate example on differents type of GUI, hope it will help you to better understand how it work: ScaleGui.rbxl (59.5 KB)
I think I’m starting to understand how to use it now, but i’m still running into an issue:
Firstly, can the frame be any size? I made it cover the whole screen
Second, although I’m using the grid layout stuff correctly now it still won’t scale properly onto other devices like yours does.
What I do is: Scale the frame, give it a UI aspect ratio constraint or whatever the name is, then I scale the elements inside of it. yet it still looks horrible on other devices.
On the positive side, the UI wont move anymore when I start the game. It’s just not scaled properly on other devices for some reason:
Are you sure the frame is 1,0,1,0 just remove the text into scale and type 1 it should be on the whole screen
Also add ui aspect ratios to the buttons
The frame was already at the size 1,0,1,0 but when I added the UI grid layout too the frame then the size became close to full screen covering but not quite on the Y axis.
But when I removed the UI grid layout for the screen it’s scaled the buttons onto the devices much more well now but still not quite there.
It’s failing to scale properly for iphone 4 and iphone 5.
Adding UI aspect ratios to the buttons seemed to have no effect aswell.