📜  单击按钮时 roblox lua 代码示例

📅  最后修改于: 2022-03-11 14:54:56.076000             🧑  作者: Mango

代码示例1
function leftClick()
    print("Left mouse click")
end
 
function rightClick()
    print("Right mouse click")
end
 
script.Parent.MouseButton1Click:Connect(leftClick)
script.Parent.MouseButton2Click:Connect(rightClick)