Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to use local modules?

How do you require a module client side with an assetid? the obvious way doesn't work.

I also tried requiring the module server side with a remote event and calling it from a client and returning the module, didn't work.

1 answer

✓ Accepted answer

You can't

Under the assumption that require by ID is a naive attempt at protecting private modules, there's an implementation limitation meaning that you simply can't require private modules onto the client because it could be used to steal the module - The client can do all the memory manipulation they want to get access to it.

You'll simply have to expose the module to the client by putting it somewhere replicating. With Valkyrie we had a primitive form of that before we went open-source where the client would be given a dumbed-down an lightweight version of the API.

This discussion is preserved as it was. New answers, comments, and votes are closed.