Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR LUA

how to execute scripts when a button gui is pressed roblox

function leftClick()
	print("Left mouse click")
end
 
function rightClick()
	print("Right mouse click")
end
 
script.Parent.MouseButton1Click:Connect(leftClick)
script.Parent.MouseButton2Click:Connect(rightClick)
 
PREVIOUS NEXT
Tagged: #execute #scripts #button #gui #pressed #roblox
ADD COMMENT
Topic
Name
8+1 =