How would one go about making an expand and collapse system?

Hey, devs!

I’ve been wondering for a while now, how does one make an expand and collapse system? (Like the explorer or the output)

I’ve been trying to do this with my Gui, but I’ve been failing a few times already, and I’m in need of assistance.

I would be very grateful if anyone could explain how to achieve this system! :smile:

There are two of this, if that’s what i think you’re asking for.

• The Animated way:
In this you “grab” the GuiObject and call a function named TweenSize this function Tween the object with the given arguments, there is other very similar called TweenPosition.

• The Simple way:
As the last step we grab the object, but now we don’t need to call nothing; here we set properties named Enabled or Visible that adjust to our preference.

I hope this help you.

Good night,
Corotyest.

If you want it to pop out too and draggable, there are tutorials on youtube.
But to make it snap back in place, you could try a “double tap to snap back” type of style. Tap on the UI twice and it teleports back to origin.

Sorry for the late response, been having some internet issues lately.

I already know how to do this, but how would I make the frames below the top frame go down by 1 step and not the other?