Device Resolution Detection

Hey, Cookie Forums!

Recently, I was making a game UI and noticed huge scaling issues. The UI looked absolutely terrible on larger devices. I was wondering, how could I detect the devices resolution and change a UI scale’s scale to be smaller when the device is larger? I was hoping that this would make the UI smaller and add more padding around the UI when the device is larger to prevent this.

@cam; Moderator

Best way to detect issue would be via ScreenGui.AbsoluteSize:

local size = ScreenGui.AbsoluteSize
print("The screen size is", size.x, "by", size.y, "pixels.")

Then you can change the position of elements:

 frame.Position =,-frame.AbsoluteSize.X,0,0)

However, have you got any UI issues in specific that you would want fixing?

Not precisely, just overall. How could I make a UIScale’s scale smaller depending on the larger that size is?

Plugins should be able to do this, have you considered doing it by hand though?

They is plugins to fix this issue.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.