Need Help Creating A Plugin

So, I am looking to create a plugin but I cannot find any good tutorials. I only found 1 which taught me the basics:

local toolbar = plugin:CreateToolbar("Module Importer")

local openGUIButton = toolbar:CreateButton("Open_GUI", "Open The Module Importer GUI", "rbxassetid://1507949215", "Open GUI")

openGUIButton.Click:Connect(function()
	local Script = Instance.new("Script")
	Script.Source = ""
	Script.Parent = game:GetService("ServerScriptService")
end)

So, I was wondering if there’s anymore tutorials on how to advance to the next step such as plugin GUIs. Thanks :smiley:

On the developer hub, a link to the github repro for useful tools in a plugin is given

go here to learn about Dock widget plugins :
Building Studio Widgets

creating stuff in StarterGui wont allow users to interact with Gui components unless in play mode, if you want to be able to use TextButtons etc. in Studio then parent the Gui components to CoreGui or the Dockwidget Gui, remember to handle all actions through the plugin script.

Visit the link I posted above to learn how to put checkboxes, sliders etc. in your Gui

Create normal GUIs and use as you normally would. The difference is that you put ALL of your code inside the plugin script

So by all, does that also mean LocalScripts?

Also, how would I get the GUI to show?

(post withdrawn by author, will be automatically deleted in 1 hour unless flagged)

This is how I organize my plugins. You put all frames in a GUI like shown and set Visible to true. E.g. when the player clicks the toolbar button AuthFrame will be shown. You can ignore everything else.

This will show as a normal GUI and not as a widget.

Screenshot_1sss

1 Like

But with the code, where do I put it? Do I use LocalScripts or what?

You put it in the plugin script, e.g. MetroSimInsertPlugin script as shown in the pic. You code everything as you would with normal GUIs

But then, with the CoreGUI, how would I edit it then? (Such As MouseButton1Click) :thinking:

What do you mean by edit? 30 characters

You write the functions like that: (I will give example of my code, it’s inside the main script)

--creating toolbar code comes before all of this

local insertGui = script.Parent:FindFirstChild("InsertGui")

insertGui.AuthFrame.SubmitButton.MouseButton1Click:Connect(function()
	if insertGui.AuthFrame.PassField.Text == password then
		insertGui.AuthFrame:Destroy()
		script.Parent:FindFirstChild("OpenButton").Parent = insertGui
		script.Parent:FindFirstChild("MainFrame").Parent = insertGui
		script.Parent:FindFirstChild("InfoFrame").Parent = insertGui
	else
		insertGui.AuthFrame.PassField.Text = ""
		insertGui.AuthFrame.PassField.PlaceholderText = "Invalid Password!"
		wait(1)
		insertGui.AuthFrame.PassField.PlaceholderText = "Password"
	end
end)

Sorry, I have found a tutorial.

Yeah, that’s what I meant by scripting like a normal GUI.

2 Likes