Client code in a module script

Hello, I’m trying to make a client sided module script rather than a server script.

I’m trying to make a building system and I think it would be more re-useable in future games if I used a modular system for this.

Roblox’s module scripts are perfect for this task, however I’m new to module scripts and I’m pretty sure they are server-sided. I don’t want this however, I want a build system that can function on the client.

Just because I’m new to module scripts doesn’t mean I’m new to scripting. I know the dangers of client trust so you don’t have to worry about me doing something irresponsible like storing coins on the client.

Is it possible to decide whether a module script is client or server?

1 Like

Yes, it all depends on where you require it from. If you require it from a local script it will be client sided, but if you require it from a server script then it will be server sided. You can have a module script run both on the client and the server simultaneously if you really want to.

2 Likes

Thanks, It would have been better if the YouTube tutorial I watched told me this.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.