Roblox UtilitiesDevlHub Roblox Documentation

Class

Controller

NotCreatable
Inherits
Instance › Object
Memory category
Instances
Subclasses
3

The base class for controller objects, such as the HumanoidController object.

The base class for controller objects, such as the HumanoidController object.

Methods 5#

BindButtonActivates an overriding bind on the specified button.
bindButtonDeprecated
GetButtonReturns whether or not Button is being pressed.
getButtonDeprecated
UnbindButtonRemoves the bind on button.

BindButton(button: Button, caption: string): ()#

Activates an overriding bind on the specified button.

NameTypeDefaultDescription
buttonButtonThe Button to bind.
captionstringThe 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.

NameTypeDefaultDescription
buttonButton
captionstring
Returns
  • ()

GetButton(button: Button): boolean#

Returns whether or not Button is being pressed.

NameTypeDefaultDescription
buttonButtonThe Button whose pressed state to check.
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.

NameTypeDefaultDescription
buttonButton
Returns
  • boolean

UnbindButton(button: Button): ()#

Removes the bind on button.

NameTypeDefaultDescription
buttonButtonThe Button to unbind.
Returns
  • ()

Events 1#

ButtonChangedFired 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.

NameTypeDefaultDescription
buttonButtonThe Button whose pressed state changed.

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed

Subclasses 3#