BAABAA SHEEP WORKSHOP · UI ASSETS

Roblox UI Sprite Sheet: Split PNGs or Use One Atlas

One PNG, two ways to use it. Export six individual transparent icons, or keep the sheet as one Roblox UI image and show a different rectangle in each label.

Six original pixel-art shop icons: a green key, gold bell, purple tag, blue wisp, coral lantern, and a yellow packet
70 × 45 px · 6 icons · original Baabaa Sheep art

Option 1. Export six PNGs

  1. Open the Sprite Sheet Splitter and select Try 3 × 2 example. This loads the sample and fills both margins and gaps automatically.
  2. If you open the downloaded sample manually, set 3 columns, 2 rows, 5 px margins, and 3 px gaps on both axes. Keep trim and skip off to preserve the full 18 × 16 px tiles.
  3. Download the ZIP. It contains six PNGs and sprites.json. The image is processed in your browser.

Option 2. Keep one Roblox atlas

  1. Import the original sheet in Roblox Studio as one image. This step happens in Roblox, not on Baabaa Sheep.
  2. Point each ImageLabel at the same asset ID. Set its ImageRectOffset from the table and ImageRectSize to 18, 16.
  3. Compare all six icons with the sheet preview after import. The values assume the asset stays 70 × 45 px.

Exact source rectangles

The offsets are zero-based pixels from the sheet’s top-left. If you trim a tile, the manifest’s output offset describes the separate PNG, not the original atlas. Use source for the atlas.

IconRow / ColX, YW × H
Stock Key1 / 15, 518 × 16
Shift Bell1 / 226, 518 × 16
Shelf Tag1 / 347, 518 × 16
Cooler Wisp2 / 15, 2418 × 16
Night Lantern2 / 226, 2418 × 16
Packet Buddy2 / 347, 2418 × 16

Using a different grid? Calculate its ImageRectOffset and ImageRectSize. If you know the original and resized dimensions, the calculator checks for fractional edges without silently rounding.

Example Luau setup

Add six ImageLabels under a Frame, then insert this LocalScript under that Frame. This sample follows the Roblox ImageLabel API; Baabaa Sheep does not publish to your Roblox account.

-- LocalScript under a Frame with ImageLabels named Icon1 to Icon6.
-- Replace YOUR_IMAGE_ID with the ID for the original 70 × 45 PNG.
local frame = script.Parent
local sheet = "rbxassetid://YOUR_IMAGE_ID"
local offsets = {
    Vector2.new(5, 5), Vector2.new(26, 5), Vector2.new(47, 5),
    Vector2.new(5, 24), Vector2.new(26, 24), Vector2.new(47, 24),
}
for i, offset in ipairs(offsets) do
    local icon = frame:WaitForChild("Icon" .. i)
    icon.Image = sheet
    icon.ImageRectOffset = offset
    icon.ImageRectSize = Vector2.new(18, 16)
    icon.ResampleMode = Enum.ResamplerMode.Pixelated
end

Replace one icon without moving the Roblox rectangles

In the sample, you can replace Packet Buddy in row 2, column 3 while the other five icons stay put. Keep the new PNG at 18 × 16 px and preserve its transparent padding.

  1. Download the six untrimmed tiles from Option 1. Replace sprite-r002-c003.png with your edited PNG, keeping the same filename. The published sample stays unchanged.
  2. Open PNG Sprite Sheet Maker and select all six PNGs, not the ZIP or manifest. Set 3 columns, a 5 px outside margin and a 3 px gap. Leave numeric filename sorting on.
  3. Download the rebuilt PNG and JSON. The preview should read 70 × 45 px, with six cells at the offsets in the table. Packet Buddy’s rectangle is still offset (47, 24) with size (18, 16).

Rebuilding can change PNG encoding and metadata. What matters here is the decoded image and the rectangles. If you use the rebuilt image in Roblox, confirm the imported dimensions and point your labels at the new asset ID.