Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

How do I use spritesheets?

Asked by
bobder2 135
10 years ago

I'd like to use a spritesheet in GUI for a game of mine, but I'm not sure how I would go about using one. Any help would be much appreciated! :D

1 answer

Log in to vote
2
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
10 years ago

Using the ImageRectSize and ImageRectOffset properties of the two Image* gui objects, you can use spritesheet decals. The 'rect' is the size of each individual sprite (you can change this on the fly if you want to.) and the 'offset' is akin to the UDim3 Offset component in that it's based on the top-left corner.

I'd add links but I'm on mobile right now, sorry!

0
Thanks! bobder2 135 — 10y
0
Also to note, make sure to evenly space your sprites as well! TofuBytes 500 — 10y
0
You can actually change both settings on the fly, so you don't have to do that at all! adark 5487 — 9y
Ad

Answer this question