Basically my problem is that I have to script and UI that contains let’s say… 10 buttons, and I want to link those 10 buttons in just one local script, so I have to do this:
local function GuiName()
-- Put whatever you want to happen to you gui
end
GuiName()-- the way you call the function
This is how you would do it if every code was the same for each button, if they have different things like changing the name then don’t add that to the function just add that manually.
If they all have the same parent, you can just iterate through the children (using a for loop), check if it’s a textbutton and then connect the function to the Activated/MouseButton1Click event.
Not sure if I misunderstood the question though