I am trying to make the same function occur on different triggers basically. Currently I have something like this within a GUI Button:
function onClicked(GUI) --code end script.Parent.MouseButton1Click:connect(onClicked)
Can I just add connect statements to this for other GUI buttons in the game like this?
function onClicked(GUI) --code end script.Parent.MouseButton1Click:connect(onClicked) game.workspace.otherButton.MouseButton1Click:connect(onClicked) game.workspace.otherButton2.MouseButton1Click:connect(onClicked)