Hey all, Merry Christmas to those of you that celebrate it. I'm writing a chunky code, and I have a single function that 4 events will trigger. Each of these 4 events takes up a line of code, which eventually adds up later. How would I enforce DRY (Don't Repeat Yourself) on such a block?
local function Click()
print("Do Stuff")
end
Button1.Activated:Connect(Click)
Button2.Activated:Connect(Click)
Button3.Activated:Connect(Click)
Button4.Activated:Connect(Click)

1 comment
Are Buttons Tools?