How to get many clips from a single image?

I have 6 images in this single image:

image

I want to animate it, ie, I want to take 6 different pieces of this image to create an animation script.

How can I get it?

You could try putting the decals in a table and looping through them

decalIDs = {
your decal here, your decal here, your decal here, your decal here, your decal here, your decal here
}
decal = script.Parent.Decal

--loops through decals forever
while true do
for _, decalID in pairs(decalIDs) do
--sets decal texture to the decal in the table
decal.Texture = decalID
task.wait(0.1)
end
end

Sorry for lack of indents typing code on DevForum is hard xd
Tell me if it don’t work

Didn’t get it.
Decals are used by Baseparts.
It’s a Gui. It’s 2D.
Any step of the coin is located in different sizes and positions (x, y).

oh I thought you were using decals lol

You can easily change it to gui tho

decalIDs = {
your decal here, your decal here, your decal here, your decal here, your decal here, your decal here
}
decal = script.Parent.Image

--loops through decals forever
while true do
for _, decalID in pairs(decalIDs) do
--sets decal texture to the decal in the table
decal.Texture = decalID
task.wait(0.1)
end
end

One of us is not understanding what the other is talking about.
How will I demarcate the different x and y coordinates for each step of the main coin image?

Can you say that in uh simpler words I don’t know what demarcate means

See the image in the original post. There are 6 images in 1. I need to tell the script the size and position of each one of the 6 “sub-images” of the main image, in order to show each frame only the piece referring to the image, can you understand?

O h h h that’s what you meant

Try this? ImageLabel | Roblox Creator Documentation

1 Like

I assume that is a spritesheet? If it is, use what @R41NB0W4C3 said.

1 Like