PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

CreateButton

This function creates a Button in the Toolbar.

Parameters

Name Type Default Description

Returns

Return Type Summary

Code Samples


Toolbar:CreateButton

This example creates a toolbar named Hello World Plugin Toolbar. The text next to it will say “Print Hello World” and when you hover over the button it will say “Click this button to print Hello World!” The icon it uses will be the decal referenced by iconname.

local PluginManagerObject = PluginManager()
local Plugin = PluginManagerObject:CreatePlugin()
local Toolbar = Plugin:CreateToolbar("Hello World Plugin Toolbar")
local Button = Toolbar:CreateButton("Print Hello World", "Click this button to print Hello World!", "rbxassetid://133293265")