学习
引擎类
Controller
无法创建

*此内容使用人工智能(Beta)翻译,可能包含错误。若要查看英文页面,请点按 此处


概要
方法
BindButton(button: Enum.Button,caption: string):()
bindButton(button: Enum.Button,caption: string):()
已弃用
getButton(button: Enum.Button):boolean
已弃用
继承成员

API 参考
方法
BindButton
Controller:BindButton(
button:Enum.Button, caption:string
):()
参数
caption:string
返回
()
代码示例
控制器:绑定按钮1
local ControllerService = game:GetService("ControllerService")
local humanoidController = ControllerService:FindFirstChildOfClass("HumanoidController")
humanoidController:BindButton(Enum.Button.Dismount, "获胜!")

bindButton
已弃用

GetButton
Controller:GetButton(button:Enum.Button):boolean
参数
返回

getButton
已弃用

UnbindButton
Controller:UnbindButton(button:Enum.Button):()
参数
返回
()

活动
ButtonChanged
Controller.ButtonChanged(button:Enum.Button):RBXScriptSignal
参数

©2026 Roblox Corporation、Roblox、Roblox 标志及 Powering Imagination 是我们在美国及其他国家或地区的注册与未注册商标。