Plugin:ReloadPlugins()

As a Roblox developer, it is currently too hard to develop plugins.


Reloading plugins stops all running plugin scripts and coroutines completely, removes all plugin buttons/categories, then re-runs installed plugins. Reloading plugins is already implemented and happens any time you install a new plugin.


My favorite solutions to the plugin-development problem are user-written tools such as HotSwap (thread), PlacePlugins, and Run Script (which runs things in a plugin environment).

If there is an error or bug in any of the “plugins” these scripts run, there is no way to stop their scripts and remove their plugin buttons. The only way around this is Run mode, which runs all scripts in game, runs the physics simulation, and disables undo/redo. Not the ideal plugin testing environment. HotSwap uses Run mode.

Ideally…

  • HotSwap would have a “Run” button that clears out old buttons and stop scripts from the hotswapped plugin. HotSwap would then run the hotswapped plugin.
  • PlacePlugins would have a “Load/Reload” button which clears out old buttons, stops plugin scripts, then runs all PlacePlugins.
  • Run Script would have a “Clean” button to stop all scripts and clear out any buttons made by previously-ran scripts.

Plugin:ReloadPlugins() makes all of this possible in a simple manner using existing functionality.


When :ReloadPlugins() is called, all plugin code would stop, including the plugin that called :ReloadPlugins(). If a plugin wants to transfer state across the reload then it needs to save it in the game tree somewhere.

:ReloadPlugins() is the ideal solution here because it works with the tools I already use and is more flexible than if Roblox implemented the features of just one of the example plugins.


If Roblox is able to address this issue, it would improve my experience using and developing plugins.

20 Likes

This feature would be extremely helpful to those that make plugins. Even though I really don’t plugins (as of right now), I greatly support this feature as others may find it as a godsend. :slight_smile:

Yeah this would be good. Even if it were just a button in Studio that let you reload the plugins. The functionality exists somewhere already–plugins are reloaded if you install or update a plugin now.

9 Likes

I’m bumping this, it’s still a issue, where we want to update plugins…

1 Like

I don’t think this should be a method added to the plugin class, but rather a button in studio.

We need a generic API for detecting when the current running script/plugin is disabled, so plugins can properly clean up Gui’s before restarting. This also extends to gear and free models:

1 Like

After two years this is still an issue, every time I want to reload a plugin that isn’t a lua file but a rbxm file I have to re-open studio. It’s such a waste a time and frustrating to constantly repeat this process due to the lack of this feature. you have to save as local plugin to reload everything.

5 Likes