how to execute scripts when a button gui is pressed roblox
snippet in lua

how to execute scripts when a button gui is pressed roblox

user9062

function leftClick()
	print("Left mouse click")
end
 
function rightClick()
	print("Right mouse click")
end
 
script.Parent.MouseButton1Click:Connect(leftClick)
script.Parent.MouseButton2Click:Connect(rightClick)