BindButton (Function): Difference between revisions

From Goodblox Wiki
Jump to navigationJump to search
(created the page)
 
mNo edit summary
 
Line 4: Line 4:
|arguments            = [[Button (Enum)|Button]] ''button'', [[String]] ''action''
|arguments            = [[Button (Enum)|Button]] ''button'', [[String]] ''action''
|returns              = n/a
|returns              = n/a
|description          = Binds action to button.
|description          = Binds action to ''button''.
|object              = [[GBX.lua.Controller (Object)|Controller]]
|object              = [[GBX.lua.Controller (Object)|Controller]]
}}</onlyinclude>
}}</onlyinclude>

Latest revision as of 05:08, 27 September 2021

Function
Syntax BindButton( Button button, String action )
Returns n/a
Description: Binds action to button.
In Object: Controller


Example

When run from a LocalScript...

game:GetService("ControllerService").Instance:BindButton(Enum.Button.Dismount, "Win")
-- Will result in a Gui saying "Win"