ㅤTag & Button ㅤ

Hey, it’s quite important, a small question, how do I make a function activate when a button is activated with a certain tag?

Info, I don’t want to know if an activated button has the tag, but if a button is activated with the tag.
Why? I have a lot of buttons and I don’t want to use them all:
local Button1 = Frame.Button1

Button1.Activatte:Connect(Buttonactivatet)

I no longer have a problem with it, because I now have everything separately, but the question still remains

Maybe you can loop through all buttons in playergui and assign a function for them and check their tags. I’m not sure