About module script [ASK]

Is there a way to require server module script by local script, using remote event/function maybe? Because I put module script in server storage but I want to require it locally. My module is not table only, but function.

Put the modulescript in replicatedstorage, god damn it
Basically, putting a ModuleScript inside ReplicatedStorage makes it fire locally, I think

1 Like

Requiring server storage locally is near impossible. You must put it in replicated storage.

If your module script contains important stuff, do not put it in replicated storage.

Exploiters could easily access that.

1 Like

Well I know about this, I was thinking to put on server storage to make it safe.

does that rlly matter or is it to keep it organized?

Putting a module script in replicated will not make it fire from the client, you still have to require the module to fire it. Replicated makes it so you can access both client and server.

Putting important modules in replicated can easily let exploiters access into it.
Either put them in serverstorage or severscriptservice,

the sad part - you cant access those from local scripts

Have you heard of the self var by chance??

Some modules are pretty much important, that’s why I put it on server storage, well basically I’m using FireServer to run the server module from client.

OOP? Are you talking 'bout that?

Have you tried using Postie, it’s a way for clients to send stuff to the server, if you use that event to require the module it is more secure.

Ultimately you could fire a remote to a server script and require the module.

Well if it’s just a table yes I can return it back to client using Invoke, but function I need to run it using FireServer, but not about only require, if using FireServer Require + Run the command, so basically because I have many function under that module, I make like FireServer(Type) and in the Server, I use if Type == “Run” then Module.Run() etc.

1 Like

I think RemoteFunction only return function turn into table or can it return function?

Essentially the game I’m programming rn and I’m in has a OOP setup, and the way it’s set up in replicated removes the security issue. I’m just not entirely sure how it’s done…

Essentially the client is mostly the modules, the modules act as the client we limit the local scripts we use so they cannot be exploited. I would try to limit my client scripts and try to use the Module as the client and server by using OOP. All the modules we have to use the preset self, the self variable is programmed so self.Base is any model that has a class value of that script name.

Yeah about OOP i know, but what do u mean about this.