You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
I would like to be able to send to the function which button has been clicked
- What is the issue? Include screenshots / videos if possible!
I have no idea how to send which one of the following buttons has been clicked. I would like to send this information to the function.
local function ButtonClicked()
--code here
end
--Function Start
Buttons[1].MouseButton1Click:Connect(ButtonClicked)
Buttons[2].MouseButton1Click:Connect(ButtonClicked)
Buttons[3].MouseButton1Click:Connect(ButtonClicked)
Buttons[4].MouseButton1Click:Connect(ButtonClicked)
Buttons[5].MouseButton1Click:Connect(ButtonClicked)
Buttons[6].MouseButton1Click:Connect(ButtonClicked)
Buttons[7].MouseButton1Click:Connect(ButtonClicked)
Buttons[8].MouseButton1Click:Connect(ButtonClicked)
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried searching around and found nothing