The information on this page may no longer be accurate. To see the latest, go to our new and improved documentation. You can also learn more about the future of documentation.
Collapse Sidebar


UnbindAction will unbind an action by name from user inputs so that the action handler function will no longer be called. Call this function when the context for some action is no longer applicable, such as closing a user interface, exiting a car or Tool/Unequipped|unequipping a Tool. See ContextActionService/BindAction|BindAction for more information on how bound actions operate.

This function will not throw an error if there is no such action bound with the given string. Using ContextActionService/GetAllBoundActionInfo|GetAllBoundActionInfo or the Developer Console’s “Action Bindings” tab, you can find out what actions are presently bound.


Name Type Default Description


Return Type Summary

Code Samples

ContextActionService Tool Reload

This example properly shows how to use ContextActionService in binding user input to a contextual action. The context is the tool being equipped; the action is reloading some weapon. Test this code sample by placing it in a LocalScript parented to a Tool. When the Tool is equipped, a “Reload” action is bound, and when the Tool is unequipped the “Reload” action is unbound. When the player presses R with the Tool equipped, the message “Reloading!” will appear.