How make responsive size in different resolution?

Hello, I would like to know how to do it through script and not with the automatic plugin, any idea how to get it?

I would like to make the size of the buttons, frames, etc. will adapt to different resolutions mobile and desktop

1 Like

Well, you don’t need a script. You just have to change the UI size using Size > Scale > X and Y. You can use a script to create a UIAspectRatioConstraint.

2 Likes

how would i do that? I’m not sure

2 Likes
uiarc.Parent = game.StarterGui.Frame -- Can be changed to other UI frame or button etc
2 Likes

Thanks you!

And by chande do you know, how could i condition the positions for mobile devices and desktop devices?

Wait before this you u have to do
local uiarc = Instance.new(“UIAspectRatioConstraint”)

I AM not sure how to. There is a special service to check devices. I think PolicyService

1 Like