Plugin template?

Hello. Do you have any plugin’s template rbxm that you wanna share with us?
Like when you start a new plugin. do you start from scratch everytime or do you have a quick template to prototype in? and what’s your best practices in developing plugins in roblox studio?
Am trying to help people develop good simple plugins in the future, so anything would be helpful !

For example here is a simple plugin that i made in a tutorial, i tried to be as simple as possible!
image

local Toolbar = plugin:CreateToolbar("Tutorial Suite")
local NotesButton = Toolbar:CreateButton("Notes", "Type some notes", "rbxassetid://4370186570", "Notes")
local Opened = false

local NotesWidgetInfo = DockWidgetPluginGuiInfo.new(
	Enum.InitialDockState.Left,
	false,   -- Widget will be initially enabled
	false,  -- Don't override the previous enabled state
	200,    -- Default width of the floating window
	300,    -- Default height of the floating window
	150,    -- Minimum width of the floating window (optional)
	150     -- Minimum height of the floating window (optional)
)

local NotesWidget = plugin:CreateDockWidgetPluginGui("Notes", NotesWidgetInfo)
NotesWidget.Title = "My Notes"
local NotesGui = script.Parent.NotesGui
NotesGui.Parent = NotesWidget

local NotesGuiToolbar = NotesGui.Toolbar
local NotesZoomInButton = NotesGuiToolbar.ZoomIn
local NotesZoomOutButton = NotesGuiToolbar.ZoomOut
local NotesTextBox = NotesGui.TextBox

NotesZoomInButton.MouseButton1Click:Connect(function()
	NotesTextBox.TextSize = NotesTextBox.TextSize + 4
end)

NotesZoomOutButton.MouseButton1Click:Connect(function()
	NotesTextBox.TextSize = NotesTextBox.TextSize - 4
end)

NotesButton.Click:Connect(function()
	if Opened then
		NotesWidget.Enabled = false
		Opened = false
	else
		NotesWidget.Enabled = true
		Opened = true
	end
end)
1 Like

There’s no template for scripts, right? Well, there is, the print("Hello world") line, but you’re gonna delete it anyways. I don’t think there are templates for plugins out there, because plugins can do pretty much anything you want it to.

1 Like

I know but a simple template as quickly getting a toolbar, a button and a widget for example.
Since most plugins needs at least those

Btw what do you have any simple suggestions for simple plugins to make in a tutorial?

Well, here’s a template for cresting a toolbar with a button.

local toolbar = plugin:CreateToolbar("Toolbar")

local button = toolbar:CreateButton("Button", "Click me!", "rbxassetid://####")

The #### in rbxassetid://#### would be the icon for the button. I don’t actually know any good icons for a template, so go with whatever you’d like.

Edit: For a suggestion to do in a tutorial, maybe make a plugin that prints the amount of parts in workspace.

1 Like

Whenever I start a plugin I normally get my template by copying from the wiki tutorial.

2 Likes

Yea that’s a good example! I’m thinking about making a plugin to make the process of creating a plugin easier. I wonder what features should i include?!