Im having a problem with scaling and positioning UI. I have been looking for the solution to my problem on youtube and devfourm, but I cant find any solutions. I did find a plugin but I want to learn how to scale and position UI with scripts.
How would I go about scaling and positioning UI with a script? Please explain how it works also.
I use plugins to make the UI on scale so it auto scales on every device maybe you can get the source code from the plugin and learn that way? You can do that with this game:GetService(“InsertService”):LoadAsset(ID,true).Parent = workspace
in the ID put the ID of the plugin
Ehh, not quite yet, you need a UIAspectConstraint in the children of the UI so they scale accordingly with the parent. (Make sure AspectType is ScaleWithParentSize) - UIAspectRatioConstraint | Roblox Creator Documentation
As already written, this is a Mini Tutoral that shows the basics to scale the UI in all devices,
By following the tutorial I made, you can do it without any problems.
it is obvious that there are many other tools to make them even more perfect.
Don’t forget to set the scale.
By Setting the Size and Position offset to 0, the gui is perfect in all devices.
Currently, I use This Plugin In Huge Game And I Never Have Trouble Scaling GUI without using UIAspectConstraint or others things.
If desired, it can be added but it is not mandatory.
Also, If You Want It By Downloading the plugin I linked, you can insert it in all you’re GUI that you select