A downloadable asset pack

Download NowName your own price

AutoSliceScale

AutoSliceScale automatically scales the SliceScale property of Roblox UI objects based on the player's viewport size, making 9-slice UI elements more responsive across different resolutions.

Features

  • Automatic responsive SliceScale
  • Supports custom reference resolutions
  • Uses CollectionService tags
  • Supports custom base SliceScale values
  • Automatically updates when the viewport changes
  • Lightweight and easy to set up
  • Fully open source
  • MIT License

Setup

  1. Place the LocalScript in StarterPlayerScripts.
  2. Tag each UI object you want to scale with "Slice".
  3. Configure the SliceScale Attribute if needed.
  4. Set REFERENCE_WIDTH and REFERENCE_HEIGHT to match the resolution used to design your UI.

To find your current viewport resolution, run this in the Roblox Studio Command Bar:

print(workspace.CurrentCamera.ViewportSize) 

Use the resulting X and Y values as your reference resolution.

Roblox Creator Store

You can also get AutoSliceScale directly from the Roblox Creator Store:

AutoSliceScale on Roblox Creator Store

Feedback, suggestions, and contributions are always welcome.

License

This project is licensed under the MIT License.

Download

Download NowName your own price

Click download now to get access to the following files:

AutoSliceScale.luau 2.1 kB

Leave a comment

Log in with itch.io to leave a comment.