I need help with TweenSize with UI

It’s been quite a time since i last used this so i don’t remember it exactly, but i need to set the frame to a new size but i don’t want it to just set the new size, i want to make an animation for it just using tweensize to change it’s size.
So far i tried frame:TweenSize(UDim2.new(size)) wich is what i remember for this, can someone help me make this without needing a bunch of code? I remember i could do it with just one line. Thanks :smile:

If you only input a UDim2 value into the function, you won’t have much customization for the tween. Here is the documentation for TweenSize, and you are probably going to want to use TweenPosition as well. The arguments for the functions are listed in order. I don’t think you will get much by only using TweenSize, so you should try out TweenPosition. There is also a function called TweenSizeAndPosition which changes the position and size of the gui object at the same time, but I’ve personally never had to use it.

TL;DR: Use the API documentation for GUI tweening

1 Like
frame:TweenSize(
UDim2.new(size)
-- Style
-- Direction
)
3 Likes

script.Parent:TweenSize(UDim2.new(0, 400,0, 337), “Out”, “Quint”, 1, true)
wait(5)
script.Parent.:TweenSize(UDim2.new(0,0,0,0), “Out”, “Quint”, 1, false)

like this?