So the question is pretty straight forward, just wanting to know if theres a better way and faster way of doing it instead of
local button1 = button1 -- just a bunch of buttons and then detecting when each seperate one is clicked local button2 = button2
or looping through a frame that has the buttons in it and detecting a click.
Instead of looping just use this if thats what you mean I'm not completly sure what you need help with but this might help:
button1.MouseButton1Clicked:Connect(function() -- your code here end
Please put [SOLVED] in your title if this helped.