How to make a "Favorite" Button?

I have Emote UI and I want to make a “Favorite” button so it’s at the top of the frame when pressed and stays there even after rejoining

Animations are in a module script and the “Handler” copies a template and makes buttons to turn on animations. If someone can help me make a script that would use i don’t know? DataStore to remember which one’s are favorited I would appreciate it!

I have no idea how to start. I’m using UiListLayout and I’m not sure how is it gonna be possible. If anyone has a full idea of how I could achieve this (Even with changing the structure) then I’m open to it.

In the following pictures you can see



how the UI looks like. and the structure of it. Inside of the “Template” button you have the favorite border and inside of it there is the fill out of the heart.,

I can think of a thing where UIListLayout.SortOrder would be changed to “Name”. then after clicking the “Favourite” button, the name of the frame would be changed to for example - “A”. which would ensure that it would be on top.

I’m not at all sure if this is the best way, but it should work! :smiley:

1 Like

This wouldn’t really help cuz my Emote UI is in order of categories (The little icons). I need something that TTD3 Have.

You could simply divide the “categories” into more letters.
Example:

Emote of category A / Unfavourited would be named AB
Emote of category A / Favourited would be named AA

Emote of category B / Unfavourited would bee named BB
Emote of category B / Favourited would be named BA

Altough, this is kind of complicated indeed & I believe there is some short of easier way.