I am making my own plugins to add motors, decals, and billboard guis in the correct face in the part. Only problem is that the plugin scripts don't recognize the library plugin which is used for making plugins.

I've seen other people do the exact same thing and have a working plugin, there's no syntax error but a blue line which means that it doesn't recognize that particular piece.

It is a local plugin, saved on my computer in the location which I believe is Roblox > Plugins instead of InstalledPlugins since it is local on my computer.

I use a modulescript to create the plugin toolbar and the buttons since I don't want to clutter my scripts up a lot.

Here's the only snippet responsible for creating plugins:

local module = {}


function module.CreateToolBar(ToolbarName)
	local Toolbar = plugin:CreateToolbar(ToolbarName) -- plugin is an unknown global
	return 
end

function module.CreateButton(Toolbar, Name, HoverName, ImageId)
	local Button = Toolbar:CreateButton(Name, HoverName, ImageId)
	return Button
end


return CreatePlugin

The error I receive from the output is basically telling me that plugin is nil and it attempted to call a function on a nil value which you can't.

4 comments

0

To create a plugin, it has to be a ServerScript and you write all your code in there and then you publish that as a plugin, atleast that's how I create mine.

0

Here's a snippet of one of my plugins that I used to create a custom stat creator plugin. https://pastebin.com/HDPrBrYG - This is all in a ServerScript.

0

In general, I recommend using a ServerScript to create plugins as that is how I create mine and they work perfectly fine. You shouldn't use a ModuleScript to holster you functions as that can't be published along with your ServerScript. You also don't have to worry about people getting your Plugin code as that is not part of the Plugin Process.

0

People can get your plugin code. You can publish a ModuleScript alongside with a script in a plugin as well as other instances.