Hello! I am interested in learning how plug-ins work so I could make them to be useful for me or other people in studio. I have watched multiple tutorials about this, but I haven’t seen a tutorial on how to make a plugin “Menu” (Not as a ScreenGui) that is like the properties or output window that can be dragged around and snapped in areas. I have tried the developer roblox website api, but it does not explain it very well. Is anyone able to help me with advice or links to helpful tutorials? Thank you for your support
By programming a plugin there is a ton of features you can explore, but I recently started making plugins and I think this articles would be very helpful:
Toolbar: PluginToolbar | Documentation - Roblox Creator Hub
- Toolbar Button: PluginToolbar | Documentation - Roblox Creator Hub
DockWidgetPluginGuiInfo: DockWidgetPluginGuiInfo | Documentation - Roblox Creator Hub
- Create a DockWidgetPluginGui: Plugin | Documentation - Roblox Creator Hub
A simple example would be:
local toolbar = plugin:CreateToolbar("Toolbar Name")
local btn = toolbar:CreateButton("Button Name", "Description", "rbxassetid://<Image Id>")
local widgetInfo = DockWidgetPluginGuiInfo.new(
Enum.InitialDockState.Float, -- Widget will be initialized in floating panel
false, -- Widget will be initially enabled
false, -- Don't override the previous enabled state
250, -- Default width of the floating window
30, -- Default height of the floating window
250, -- Minimum width of the floating window (optional)
30 -- Minimum height of the floating window (optional)
)
local mainPluginUI = plugin:CreateDockWidgetPluginGui("EasyCodeUI", widgetInfo)
mainPluginUI.Title = "Menu"
btn.Click:Connect(function()
mainPluginUI.Enabled = not mainPluginUI.Enabled
end)
Hope I helped anyway, if you have any questions just ask.
Edit: To add UI elements to the DockWidgetPlugin just parent the Frame, buttons… to mainPluginUI (In this case)
4 Likes
Wow, thank you, I will test it out right now, hope it helps