How do I make image move inside a image button

So I want to make a image button that has moving images in it.
My question is how would I make this effect that I am looking for?
Would love some ideas and scripts how to do this!

Are you talking about something like this?

1 Like

Yea, something like that :slight_smile:

GUIObjects have something called ClipDescendants. If you turn them on, anything that is parented to that object will clip it. You could do this with the object’s border (BorderSizePixel), then adding an image that tweens to the top left, then sets itself back to its original position.

This effect would happen if done correctly.

What I would do is put an ImageLabel that’s sized 2, 0, 2, 0 and turn on ClipDescendants inside of a frame, then add this inside of the ImageLabel:

while game:GetService("RunService").RenderStepped:Wait() do
	script.Parent.Position = UDim2.new()
	script.Parent:TweenPosition(UDim2.new(-1, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 2, true)
	wait(2)
end

Hopefully that’s what you want.

12 Likes

That’s exactly what I want! Thank you for your help!

1 Like

What decal did you use? I really like the look of it

1 Like

rbxassetid://432615416. You can find it here.

2 Likes

Thank you very much!!! :smile:

1 Like