Need help making game optimizations

So, I’m making a fighting game currently that will start with at least 7 classes. Each of these classes will have unique abilities that lets them fight people, for these abilities, I’m planning to make a folder for modules for each character in the game in replicated storage, and then access it from the client. Is this a smart thing to do?

Not sure exactly what you a saying, but you might want to know that module scripts can be exploited just like a client script if they are located where the player can get to them (like in replicated storage.)

If possible it should always be server sided it’s much more secure then module/client/local

Yes, It would keep your Game more organized in the long run, you can have a Module for a certain class of things and maybe another within it to Handle other tasks.

Note that ModuleScripts can be decompiled, which isnt something you want.

You put your Important Modules inside ServerScriptService and ServerStorage to keep them secure and away from Exploiters, To Share Modules between the Server and Client, you use ReplicatedStorage, otherwise, Keep them secure.

1 Like

@mc7oof @Sushiriceforlife @DasKairo

I read this comments and I’m wondering if I should even use modules anymore. The reason why is because, I’m not trying to make my game easy to exploit so, what should I do?

3 Likes

Server server server server server server.

Edit: better safe then sorry once one guy hacks it it’ll be really hard to find the back door he used BE ON DA SAFE SIDE

Modules can be decompiled, so if you have modules that are exclusively used on the server, you should be putting those modules somewhere the client can’t see them (serverstorage, serverscriptservice)

LocalScripts can be exploited just as easily as client modules, it’s just a problem that players are able to decompile your server code if it’s being shared in a module in replicatedstorage or somewhere else that the client can see it.

1 Like

[quote=“uwuCulturist, post:7, topic:2204127”]
being shared in a module in replicatedstorage or somewhere else that the client can see it.[/quote] this also is a major flaw that Is run into often

Put scripts on the server if they’re ONLY used by the server and code in StarterPlayerScripts if they’re ONLY used by the client (or in a GUI if it handles it). If the same code is used by the client and the server, then put it in ReplicatedStorage. It’s not rocket science.

2 Likes

So, should I then make it so that the client fires a function in a module script that then gets sent to the server from a remove event?

Client → Module → Server
--------[ → RemoteEvent → Server

1 Like

You should still use them, The Important thing you should be doing with them is Securing them away from Exploiters, The Server would be Best for this purpose, Its Secure, and Exploiters can easily access it, A preferable place would be like ServerScriptService or ServerStorage where it will be hidden from the Client.

You should use them to be more Organized with your code, They will very much help you will what you are doing in your games.

This can be abused by Exploiters, you would need to Secure them as well.

If you fire a function in a module script nothing gets sent to the server, so it’s not like a remote event. Remote events should still always be used.

Should I put it in ServerStorage and then access it from there then?

You should be doing this if they are Important parts for your game, Like if you have a system to Handle matchmaking, you put it here so people dont steal it from your game, Just Note that the Client can never access ServerScriptService and ServerStorage, so if you want the Client to use the Scripts, but the Server as well, use ReplicatedStorage, but make sure you arent doing this with very important code.

Modules a great. Very useful.

Just don’t put them where players can exploit them.

Keep them on the server or server storage.

Just us Remote or Bindable Events to ask for information from the modules or from a script that requires the modules.

Then how should I go about making it so that different characters in different classes can have custom abilities? I know how to make them, but I’m really confused on how to optimize where my scripts and what-not should be.

Be just as easy to clone that from the server. Save yourself a headache later on from hackers.

It would probably work just a like a gun.

Guns contain Server Scripts and Client Scripts. But, if there is a module script involved it is requested by the Server Script inside the gun, not by the Client script inside the gun.

Does that makes sense?

The gun can have a Server Script stored in it and it is safe from exploiting, and since the Module script is loaded into the Server Script by the Server Script it is also safe.

Just store the Module Script on the Server and not in the gun (power/ability).

1 Like

I see, that makes sense. But, can’t I also just move the module script to Server Storage and then call the module script from the server script inside of the tool?

well, most of the combat must be server sided if you wish to see your game really clean of exploiters killing players instantly or with hacky methods spamming the client, however, animations should be on the client (right after the server computed your attack) i believe, if you wish to ban people just warn players at the beggining of the game that if they notice someone with ‘‘No animations’’ or smh weird stuff , let them be your eyes, most of the time works

create a cooldown depending on each class, like, some classes may attack fast, others slow… i don’t know how you will plan it

1 Like