Plugin not working

I’m trying to make a plugin with a widget, but it never works because the script is searching my COMPUTER files, not the game files. Anyone got any solutions?

local Toolbar = plugin:CreateToolbar("PR")
local NotesButton = Toolbar:CreateButton("PR Signals", "Signals", "rbxassetid://4370186570", "PR Signals")
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("PR Signals", NotesWidgetInfo)
NotesWidget.Title = "PR Signals"
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)

image

You’re saving the script as the plugin which is only a lua file. It cannot access the NotesGui so you would have to save the whole folder as a plugin instead. The object.Parent would be like “cd…” (which is Downloads\Plugin in this case) in your computer and referencing an object would be like Downloads/Plugin/NotesGui.rbxm, but the folder does not exist in your computer, so you cannot anything, but the script. To save the folder as a plugin, just right click the folder and click save as local plugin (or Roblox plugin). Very simple…

In short, save the folder (instead of the script) as a local plugin so it can be accessed properly.

1 Like

Save the folder as a local plugin instead of the script.

1 Like

Also, if your plugin does not appear in your plugins bar… Navigate here:
image

image
Click the “Plugins Folder” button… It will navigate to the Roblox plugins folder in your computer. If you want to import/add the plugin to Roblox, all you have to do is open your downloads folder in a new tab and drag the plugin folder over to the Roblox plugins folder that appeared when you clicked the button.

1 Like