How would I make a gui animation similar to this

how would I make those hover animations

If someone could give me a demo or something along those lines that would be helpful


I watched this but its not what im looking for. I’m pretty sure it uses the same basic scripting(kinda)

1 Like

It just tweens the size, position, and rotation.

The roblox api makes little to no sense to me. What I mean by that is the way they tell you about the code and other things. I wish it was more like this. Where there is example and you can see them live, etc.

It provides an example at the very bottom

If you could give me a sample code for me to learn from that would be great :slight_smile:

I found a solution to this from this thread. Thank you tho for tryna help me. :slight_smile:

Tweens, you can find some documentation here:

From the sole look at this post. I’ve considered that they have used constraints, specifically UIListLayout. This will make the buttons move out as one button is enlarged. Then comes the tweening, and that’s basically it(this is a prediction).
Here;s a place file demo you asked for:
Test.rbxl (24.8 KB)


So first off, That developer is using TweenService., As for the white glow effect, That is a white gradient which the developer also uses TweenService to make transparent.

So some code:

local TweenService = game:GetService("TweenService")
local Button = script.Parent
local Gradient = Button.Gradient

local function Tween(Obj, Info, Goal)
	if Obj and Info and Goal then
		return TweenService:Create(Obj, Info, Goal)

	Tween(Button,, {Size =, 125, 0, 50)}):Play()
	Tween(Gradient,, {ImageTransparency = 0}):Play()

	Tween(Button,, {Size =, 85, 0, 25)}):Play()
	Tween(Gradient,, {ImageTransparency = 1}):Play()

Not sure why the coloring of the code is awkward, but you get it.

Gradients can be made in
I personally use for all my UI.

1 Like

As I see it is a combination of Tweens and MouseEnter/Leave. But they can use TweenPosition

if you want an example to the TweenPosition:

local GuiObject = script.Parent ---//You should change it to the GuiObject that needs to have the animation

GuiObject:TweenPosition(,1,0,1)) --//In the brackets after the Udim2 you should enter the position you want to animate

GuiObject(,1,0,1)) --//And this is the same thing but with size.

I am not going to give a demo version of it since this is not a place to give scripts I want you to learn about it. You can learn it better by looking at the links I sent above.

1 Like

TweenInfo and TweenSize have been replaced by TweenService, please refrain from teaching new developers to do that. This is mostly due to the fact of good practice.

Only using TweenService doesn’t really achieve the button spacing effect(like how to buttons move out of the way when another gets bigger). It can, but using UIConstraints could be better.

Mhm, I know. That would take some extra scripting, But just to give him a basic idea.

I’ve made a gui animation module recently, you could use that! if you don’t know scripting:

but please read all the steps carefully.