Help with creating plugin widget

So I am trying to create a plugin that has a widget which has a list of TextButtons generated by a for loop in a script that goes through every item in a folder and I want to be able to make it so when a user clicks the button it selects the item in the folder that corresponds to that.

Would putting a script in each Textbutton that detects the click work or is there another way?

In the for loop, create a MouseButton1Click listener for the current button.

oh so like Button.MouseButton1Down:Connect

1 Like