If PluginManager is deprecated, what should i use instead?

Title says it all. PluginManager has been deprecated, so what should i use instead?

local plugin = PluginManager():CreatePlugin()

The plugin is a global in the environment when running a plugin.

The Plugin Manager wiki page says:

Which is a link to the introduction to the global plugin variable I mentioned.

1 Like

oh, didnt see that part. Thanks!

but why does plugin underline blue, as if roblox doesnt recognise it? image

Plugin isn’t a defined global in a normal script environment; it’s nil. Plugin scripts are executed in a different environment where the plugin global is defined. The blue line should be ignored.

1 Like

oh, ok thanks! it still gets annoying, maybe roblox should at least consider removing that blue line.

2 Likes