Collapse Sidebar


This function creates a PluginAction which is an object that represents a generic performable action in Roblox Studio, with no directly associated Toolbar or Button. In Roblox Studio, they can be assigned a keyboard shortcut under File → Advanced → Customize Shortcuts…, and they can also be added to the Quick Access Toolbar.

When an action is triggered, the PluginAction/Triggered event is signaled.

In order for PluginActions work as expected, they must be created using this function.

See also

  • articles/Intro to Plugins, an introductory article to plugin use and development
  • PluginMenu, a context menu that can be shown in Studio which displays a list of PluginActions and supports submenus
  • Plugin/CreatePluginMenu, creates a PluginMenu


Name Type Default Description

Must be a unique string that identifies this PluginAction from others

The displayed name of the action

The displayed description of the action

The name of the icon used to display the plugin


Whether the PluginAction will be hidden from Studio’s shortcuts view. Useful for contextual actions. Defaults to true


Return Type Summary

The newly created PluginAction object

Code Samples

Creating a PluginAction

This code sample visualizes how to create a PluginAction. Plugin actions must be created using the Plugin/CreatePluginAction function in order to work.

In order to work as expected, the code block must but pasted into the command bar, but only once. Consecutive attempts at executing the code in the command bar will result in an error because a plugin cannot create more than one PluginAction with the same id.

After executing the code, the newly created action can be assigned a keyboard shortcut under File → Advanced → Customize Shortcuts…, and can also be added to the Quick Access Toolbar.

File → Advanced → Customize Shortcuts…

Customize Shortcuts Window

When the created action is bound and PluginAction/Triggerd|triggered, it prints “Hello world!” in the output window.

local plugin = plugin or getfenv().PluginManager():CreatePlugin()
plugin.Name = "Plugin"

local function actionTriggered()
	print("Hello world!")

local pluginAction = plugin:CreatePluginAction("HelloWorldAction", "Hello World", "Prints a 'Hello world!'", "bxasset://textures/sparkle.png", true)