UIStroke not scaled perfectly in different device

So I make a stats gui that look like this
image

In my screen (desktop) it looks good. But when I test it from mobile view, the UIStroke is not perfectly scaled like in the desktop view
image

is there any way to fix this?

2 Likes

Maybe don’t use UIStroke? Also, what is UIStroke?

1 Like

hm yeah I’ve been thinking to use decal than UIStroke. UIStroke is the black border shown in the image

then yes. use the decals. it will look better

1 Like

When UI Stroke got released, I hated this thing the most. UI Stroke can’t be resized for different devices. It will stay the same thick on all devices. You should use decals instead to make it look better on other devices.

2 Likes

Yeah, unfortunately, UIStroke uses offset instead of scale, fortunately, you can probably make a script that changes the size of stroke depending on the screen size of the user. Apart from that, you can just make another UI which would be the outline, and put it behind everything.

1 Like

Or you can use the UIScale constraint, as of a recent Roblox update, UIStroke thickness now respects the UIScale.Scale property. If you write some scaling code, to set the UIScale value, you can construct all UI’s using offset (pixels) and they’ll all still scale :slight_smile:

2 Likes