How to make modding system

How should i make a modding system for my game
What i want it to do is players can write scripts, and then inject them in server-side
Not only that i want them to also be able to do stuff like edit the textures, import model, etc.
how should i do it?

(Edit:I need the player to publish the script in one place within the game then send it to another place)

2 Likes

It’s a cool idea. But some safety issues.

If anyone can just join and do it. Nah, if it’s VIP servers. Yeah! You don’t want to be getting yourself banned from public servers since a dingbat imported something inappropriate (Since Roblox don’t moderate VIP)

anyways

Have them create some folder and post it as a model. A textures folder for replacing textures. Which you can look through and replace every texture on the map to one in the textures folder if it matches the name.

You won’t need to import models or scripts. Since if you use LoadAsset and put it in Workspace, all of it will be available anyways.

I recommend you do what @Laqotaa recommended, however an alternative approach that gives you slightly more control would be using loadstring, which allows you to run a string as code.

With this approach, you could process the code submitted before running it, and apply whatever changes you wish. This could be used to ensure that no swear-words are included in the code, or stop people from using the Kick function to exclude other players.

I still wouldn’t use loadstring. All it requires is for people to find other ways to use loadstring like using this and having their “Safe Script” run through that instead.

This is how I, a person Permanently banned from Void Script Builder in the past (we worked something out like a few years back), kicked people from the game. I believe it’s patched now though.

Using loadstring is much safer than importing models.
Importing models will not allow you to apply any filters or checks to the submitted code.
Using loadstring, you can run checks on the submitted code before running it. Although this will only be as safe as your checks are thorough.

Even though. What’s the purpose. If he’s not making it a public server thing, invite only (Which he probably should to avoid his account from getting beamed by Roblox). If someone wants to Destroy the game, they may and must. It’s their place at that point. Like Garry’s mod, for example, doesn’t have any checks for backdoors or how malicious the code may be.

It is always a good idea to be safe.
Especially if OP wishes to have any control over the game.
If no security is used, any player could run code to change values in DataStores amongst other things.

Yeah its not going to be public server thing but if it was public server i would do plenty of checks for malicious stuff

Well, you could take a Modding-InGame approach (like retrostudio) instead of trusting players at all.

Use like block code, or create a parser for your own programming language. Anything to avoid users from accessing extremely important variables.

1 Like

Hm…How do i create my own programming language?

I’ve done something like this with using gitraw/pastebin and loading code that way, but it’s really time consuming to make sure that every script sent to you is 100% safe with no backdoors. But it’s the only way to keep yourself safe from attacks on your game.

If you want to make your own programming language inside of Roblox, it would have to be an interpreted language. You could try following a tutorial like this.

i see… i will try. thanks fpr helping

1 Like

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