So Im trying to tween a ui But cant figure out how

So I am trying to tween a button whenever the players mouse goes on it.
I have the mouse part down I just need to make it tween.

Problem is, I HAVE NO IDEA HOW!! I looked around a bit and most of the stuff was either outdated or just not working.

So here I am asking yalls how I would do this.
If you have any questions feel free to ask

you can use GUI:TweenPosition() or GUI:TweenSize()

I dont really understand how the whole concept of tween service works,
(Srry I have this thing where I cant understand things very well.)
So um if you could explain it more that might help

srry to bother you

you can refer this UI Animations | Roblox Creator Documentation

GUI:TweenPosition() and GUI:TweenSize() are not part of TweenService. You simply can just invoke them on any GuiObject.

You can see the API on how to use those functions here:
TweenPosition()
TweenSize()

Ok so far this is working but um how would I multiply this udim2 by 2.
When I try I get this error

Players.USER.PlayerGui.Menu.Control:289: attempt to perform arithmetic (mul) on UDim2 and number

I’m basically just doing this

local udim2 = UDim2.new(button.Size) * 2

Anyway to fix this?

You can’t multiply a UDim2. What you can do instead is multiply each size coordinate (x, y).

-- Example
local udim2 = UDim2.new(0, button.Size.X*2, 0, button.Size.Y*2)

Also make sure you are inputting the proper values for Scale and Offset in the UDim2 constructor.

I had this reply a good while ago, edited it to fix some mistakes, it could help you out.

Um hi.
How does the whole scale thing work? I noticed you mention it.
I have never used a udim2 before sorry for my lack of knowledge

Scale is the percentage of something, for example, if you make the scale on the X 0.5 (size), that means it will take up 50% of the parent’s size (so if the parent is a frame its size would be 50% of the frame) on the X axis

By the way, I am not that good with UI, but (I believe) that explanation should be correct.

I have no idea how to setup the whole scale thing. I have looked around but I cant figure it out.

As @MasterMinionnn said, scale is basically just a percentage. In this case, you are using it for position. If you set the x scale (position) to 0.5, it would be positioned in the middle of the screen no matter the size of the screen (the resolution). You can see more here: UDim2 | Roblox Creator Documentation