This object cannot be created with the
Instance|Instance.new constructor function.
A PluginToolbarButton is an object created by the
PluginToolbar/CreateButton function. It allows the user to initiate a single, one-off action in Roblox Studio through the
PluginToolbarButton/Click|Click event. Pictured below are three PluginToolbarButtons. From left to right: the default, hover and pressed states. The hovered button in the center shows tooltip text, which is the 2nd argument passed to
When pressed, the
PluginToolbarButton/Click|Click event fires. A button will also remain in the pressed state, which may be set manually using
PluginToolbarButton/SetActive|SetActive. Upon plugin activation (
Plugin/Activate), buttons in all other
PluginToolbars will be toggled off. If all buttons in a toolbar are off, the toolbar’s plugin is deactivated (
When the game viewport is not visible, buttons will be disabled as if their
PluginToolbarButton/Enabled|Enabled property were false. Disabled buttons are desaturated and do not respond to user clicks. By setting
PluginToolbarButton/ClickableWhenViewportHidden|ClickableWhenViewportHidden to true, you can allow plugin buttons to remain clickable (such as during script editing).
Prior to an update released in January 2019, this class was simply known as “Button”. This was changed to reduce confusion with similarly named in-game UI element classes, such as