I have a tool who's core function is in a private module. It works fine in studio but returns the error: 'require(assetId) cannot be called in client'.
✓ ANSWER ACCEPTED
Can Private Modules be used in tools?
2 answers
✓ Accepted answer
There's not any practical way to do it. If a LocalScript has to access it, there's not a chance of it working because any code loaded to the client could be stolen anyway. If the code can be stolen, it's counterintuitive for it to be private.
Your best bet is to have all major logic handled by the server (Which should happen anyway) and any bridging event logic happening on the client. As it should be done.
You can not require(id) from the client.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
I don't see why this got down voted, it's a legitimate yes or no question. I'll look into it.
In the roblox API, it was stated that local scripts could not require a module script. Module scripts are server side only.