Plugin RunContext

I’ve just noticed that plugins appear to have a run context issue. When you first load into Studio, the plugin will execute. Then when you run test mode, it’ll execute new instances of the plugin on both the client and the server. These are easy enough to prevent, but my issue is that the original execution of the plugin keeps the run context it started with.

What I mean is that the run context of the original plugin execution never changes, even if you enter test mode.

The issue with this is that, with no way to check the original plugin’s context level (because it doesn’t change), I can’t prevent the plugin from continuing to run in test mode.

Does anyone have any possible solutions for this? I have one in mind that I’ll post in a little while if it works.

1 Like

It seems my solution worked. I basically created a system using Set/GetSetting so that when the client version of the plugin runs, it’ll set the setting to true. Then when the LocalPlayer is removing, it sets the setting back to nil so that the original plugin can resume operating.

It’s a little bit hacky, but it appears to work without issue. I do feel like I shouldn’t have to resort to a solution like this though.

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