Class
Controller
NotCreatable
The base class for controller objects, such as the HumanoidController
object.
The base class for controller objects, such as the HumanoidController
object.
Methods 5#
| BindButton | Activates an overriding bind on the specified button. |
| bindButton | Deprecated |
| GetButton | Returns whether or not Button is being pressed. |
| getButton | Deprecated |
| UnbindButton | Removes the bind on button. |
BindButton(button: Button, caption: string): ()#
Activates an overriding bind on the specified button.
| Name | Type | Default | Description |
|---|---|---|---|
button | Button | The Button to bind. | |
caption | string | The text to display for the bound button. |
Returns
()
bindButton(button: Button, caption: string): ()#
DeprecatedDeprecated
Deprecated. This function is a deprecated variant of Controller:BindButton()
which should be used instead.
| Name | Type | Default | Description |
|---|---|---|---|
button | Button | ||
caption | string |
Returns
()
GetButton(button: Button): boolean#
Returns whether or not Button is being pressed.
Returns
boolean— Whether the specified button is currently pressed.
getButton(button: Button): boolean#
DeprecatedDeprecated
Deprecated. This function is a deprecated variant of Controller:GetButton()
which should be used instead.
| Name | Type | Default | Description |
|---|---|---|---|
button | Button |
Returns
boolean
UnbindButton(button: Button): ()#
Removes the bind on button.
Returns
()
Events 1#
| ButtonChanged | Fired when the pressed state of a bound button is changed. This event can
be used in conjunction with Controller:GetButton() to see whether
a bound button is being pressed down or not. |
ButtonChanged(button: Button)#
Fired when the pressed state of a bound button is changed. This event can
be used in conjunction with Controller:GetButton() to see whether
a bound button is being pressed down or not.
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild