【发布时间】:2019-12-19 00:26:37
【问题描述】:
我尝试使用 Roblox ContextActionService 在 roblox for mobile 中创建一个按钮,但是当我按下 gui 按钮时它会触发,当我释放它时它也会触发我希望它在我按下按钮时触发一次
function tpggle()
print("L pressed")
end
ContextActionService:BindAction("ToggleLight", tpggle, true, Enum.KeyCode.L)
ContextActionService:SetTitle("ToggleLight","L")
ContextActionService:SetPosition("ToggleLight",UDim2.new(1, -97,1, -133))
I expected:
L pressed
I got:
L pressed(x2)
【问题讨论】: