Create "connections" for Changing Buttons?

So I’m creating a Loadout system where you can apply items to your character but I ran into a wall.

As you change the categories, it’ll add all of the items for it into the scrolling frame, while removing the previous category’s items; but the issue I’m experiencing is trying to connect these buttons’ “.MouseButton1Click” events to a function since they’re constantly being created and destroyed in addition the vast amount of them. If you’ve got any idea on how I do this, I’d be really appreciative.

You can attach the event at the time you create the new button. Events are automatically disconnected when their target is destroyed.

But I think I’m missing what your issue is.

1 Like