Studio autorunning a plugin within the local plugins folder

Reproduction Steps

Derived from:

  1. Put some plugin script inside C:\Users%username%\AppData\Local\Roblox\Plugins (with any error that will force Studio to stop the script)
  2. Create a new project in Studio

Expected Behavior

Studio shouldn’t be auto-running a plugin inside the local plugins folder

Actual Behavior

Studio is auto-running a plugin inside the local plugins folder

Issue Area: Studio
Issue Type: Other
Impact: High
Frequency: Constantly

Not sure how this is a bug? Since their inception plugins have always automatically executed their scripts. It’s how they initialise and set up all the components needed to work. Sounds more like you want a feature request to prevent this and I can’t see the justification in that if it’s just to resolve an edge case since the option to disable or move plugins exists.

2 Likes

I have a plugin that I developed for internal use, and I just want the plugin to run when I click its button in the plugin bar.
How to prevent the plugin from running automatically?

The button gets created by the script when it runs. There will never be a button to press in the first place unless the plugin has already run.

If you want lighter weight plugin loading you can put most of your plugin code in ModuleScripts which only get required once you’ve actually pressed the button that the small bootstrapper script creates (this is the pattern which most of the builtin plugins in Studio use).

4 Likes

I did and it’s working, thanks.

But, putting a plugin code in a ModuleScript won’t leave it vulnerable to exploiters?

Not clear what you mean?

Plugins entirely are separate from the place that you’re working on, they’re tied to the developer using them, not the place they’re being used on.

If you mean ability for other developers to see the plugin code if you publish said plugin to the marketplace… they can see the plugin code way regardless of whether it’s in scripts or ModuleScripts. Plugin code isn’t currently protected (other than by the copyright you inherently hold on the plugin code you’ve written)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.