Create a Plugin

Hi. I don’t know how to make a plugin. I have remote event in the replicated storage, and scripts in the server script service and server storage. I don’t know how to make it where when you click the plugin, all of the scripts move into that spot. If someone can help that would be great. Thanks :slightly_smiling_face:

2 Likes

Here’s an official guide on creating plugins. I’ll summarize below:

To create a plugin, typically a Folder is used as the root ancestor. Usually this Folder is stored in ServerStorage in the plugin development experience to prevent the development source of the plugin from running. Any Scripts, ModuleScripts, or assets the plugin requires should be a descendant of this root Folder. You can create a plugin by right clicking the Folder in the explorer and choosing the option “Save as Local Plugin”, or alternatively (if you’re ready to distribute the plugin on the marketplace) “Publish as Plugin”.

2 Likes

So this is how to make a plugin.

I kinda don’t understand what you are trying to do, but If you want to move all Scripts to a specific location like a folder you can do.

for I,v in game:GetDescendants() do --loops over every instance
    if v:IsA("Script") or v:IsA("Localscript") then --checks if it's a Script
        v.Parent = <location here> -- puts it in your location
    end
end

Otherwise if you want it to put scripts in specific services you do:

for I,v in game:GetDescendants() do --loops over every instance
    if v:IsA("Script") then --checks if it's a script
        v.Parent = game:GetService("ServerscriptService") --Sets parent
    end
if v:IsA("RemoteEvent") then --checks if it's a Remote event
        v.Parent = game:GetService("ReplicatedStorage") --Sets parent
    end
end

Then connect it with your plugin button or whatever.

1 Like

Turn this into a plugin.rbxl (66.2 KB)

I would greatly appreciate if you can return the file for me so that I can make this into a plugin. Everything is where it needs to be when its a plugin it should clone or move everything into those spaces

I have to go now but I will be back online in an hour or two

Yo it’s not that hard. I can’t access studio rn so…
I hope you already have a basic plugin script somewhere there.

  1. Right click the script/folder of the plugin in explorer.
  2. Select Save as local plugin or similarly.
  3. Save as local plugin if it works fine then.
  4. You can upload it with save to Roblox.

(There is no plugin file type)

it is for what I’m trying to do unfortunately

Wait what the heck are you trying to do??

Like I get you’re trying to make a plugin, but what is this plugin supposed to do?
I feel like with that info I can probably help you cause I am so confused :sob:

1 Like

I am trying to make an anti cheat plugin that automatically moves all of my anti cheat instances into the proper locations so that all people have to do is buy my plugin, hit the button, and boom it moves all of it into the proper locations so that people can actually use my anti cheat

Ahhh I see!

With that being said, here is exactly what you’re going to want to do!

First follow this tutorial till you get to the part about clicking on the plugin button.
Then you’re going to parent your script that controls your plugin to a folder, and in that folder you’re going to have a folder that has folders that contain the assets for your anti cheat. Should look something like this:

You would then just make it so when the plugin button is pressed, loop through all the assets, determine where they need to go, and then well, clone them, then parent them there!
Simple!

Please actually try to do this, it would be much better if you learned how to do it then getting a bunch of people to do it for you!
That way you can actually learn how it works, so incase something goes wrong you’ll actually be able to fix it!

That and also getting people to write entire code or make an entire plugin is kinda against the point of Help and Feedback > Scripting Support
So please, PLEASSEEE, learn how to do it! Itll most likely be nice to know how in the future!

1 Like

I see. It definitely requires some work but nonetheless I’ve figured it out. I have to separate the source into several different areas to organize it correctly, and from there it will just require the source for each script. Thank you that post helps a ton

1 Like

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