when button is clicked roblox lua code example
Example: when button is clicked roblox lua
function leftClick()
print("Left mouse click")
end
function rightClick()
print("Right mouse click")
end
script.Parent.MouseButton1Click:Connect(leftClick)
script.Parent.MouseButton2Click:Connect(rightClick)