I am currently designing a menu UI for my game. For each of my frames within the UI, I am using another frame to provide a different-colored border appearance. It looks fine in the Studio editor but whenever I play-test my game, the frames somehow shift a bit towards a certain direction. I tried using different methods such as implementing the UIAspectRatioConstraint but the result is almost the same. Any solutions? I have attached images below for more details. Thank you.
The border is now 2px, since the Offset was -4, it’s -2 for each side.
The problem here was just size values!
In addition, Borders or anything else that is not divisible by 2 generally does not line up well in Roblox! - or any other “pixel based” software.
EDIT: Found out that the “Background” frame was not the single problem.
I’ve selected everything in the UI (all descendants) and converted them to Offset, then back to Scale, it finally fixed everything. Did all this using the 1920x1080 device emulator.
For texts, I first set the AnchorPoint to the center (with “Set Position” disabled) then I used the Text Bounding function, deselected “X Axis” and clicked “Text Bounds” button, then in the Properties panel I turned TextScaled = true - after that converted everyhting back to position/size scale!
UI now fits natively in any device: (example below is iPad Pro)