Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

Can Private Modules be used in tools?

Asked by 8 years ago

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'.

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

2 answers

Log in to vote
0
Answered by 8 years ago

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.

Ad
Log in to vote
-2
Answered by 8 years ago

You can not require(id) from the client.

Answer this question