How does Enum.RunContext.Plugin work?

I know how all the RunContexts work, except for the ‘plugin’ RunContext.
The documentation says ‘Runs as a descendant of Plugin instances’ (documentation at RunContext | Documentation - Roblox Creator Hub)

What even is a Plugin instance? I know what a plugin is, but I’ve never heard of a plugin instance before. I need help finding out how this RunContext works and how to use it, for curiosities sake. How do I get a script with the plugin RunContext to function? Note that I am a novice when it comes to plugins.
Thank you.

1 Like

a plugin is just a script in studio, so you need to create and save as plugin,

1 Like

I know. But where does the plugin RunContext come into play here? I believe you don’t need the RunContext of a script you’re making a plugin of to be ‘plugin’.

1 Like

RunContext Plugin is meant to only allow the script to execute in a plugin environment. Scripts with Legacy context (not sure about Client and Server) execute in plugins just as expected, but they also run in the data model like in ServerScriptService if you leave them there.

Currently this context exists as an enum but it isn’t implemented or enabled yet.

plugin as a builtin keyword refers to an object (service?) for creating plugins and working with them. Plugin instance is a class name of an object that represents your plugin in studio. A script that you save as a local plugins is parented to a plugin instance.

1 Like