How to tween a image label over a button?

Heyo I’m trying to figure out how to do this
e
I’m guessing they have an image label with a checker pattern image and then they tween it using tween service, but how does this even work? How do they keep the image within the button and how is it going on infinitely? Unless they’re just smoothly resetting it.

Here’s my bad attempt lol

In the tween info you can set it to loop infinitely. There’s an option, the third to last argument, that asks if you want it to repeat. Set that to -1 to have it loop infinitely.

Ok so I got the tweening part done, but how would I keep the image inside the button and like if I tween the position the pattern is gonna end eventually?

1 Like

my best guess would make it really huge then turn on clipsdescendants in the properties tab of the button.

Try looking at this tutorial. It may help: Click here

1 Like

I honestly had no idea this is what clip descendants does lmao however I still have an issue where the image does eventually end and you’re just left with some blank space for a second


is it possible to make the size infinite?

Hmm, try making the size to this:
UDim2.new(1, 0, 1, 0)
I’m not 100% sure that will work but it worth a shot.

that would just make it the size of the button itself.

i would just use a really large number, probably something like 9999999999.

you can also make the UI infinite by typing in inf but it gets so massive that it doesn’t even appear.

yeah I did use a big number for the size I did math.huge although it just disappeared lol

yeah math.huge is just the same as typing in inf.

I’m the one who created the reference you sent,

ClipsDescendant is a way to mask contents, however, it does not handle more than a cube zone,
your only way out to apply a custom shape of mask is with Viewportframe, or Spritesheets.

Spritesheet is equivalent to a .GIF playing

Then you can simply select a specific region of your image at a fast rate :

i don’t have the sources of the looped squares, but it’s pretty much the same thing.

Sorry for the late reply fell asleep lol. Anyways doing math.huge makes the image disappear


I ended up just making the image super big though and it seems to work

math.huge is basically infinite.
Example, to make max force unlimited on our body velocity instance, we can do: BodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge).

Maybe try cloning the image and sending it to the bottom, then tween in up, and repeat.

u have to make it go back to the start each time it reaches the top