Skip to main content
Discovery icon for Retro Dev Discord server

Retro Dev

8,382 Online
44,211 Members
# general3 people

code structure strategies

Developers discuss different approaches to structuring code for client and server modules, including a method where server modules are moved from replicated storage to ServerScriptService.

  • One developer structures modules by placing both server and client modules in `ReplicatedStorage`, then parents server-tagged modules to `ServerScriptService` at runtime to hide them from the client.
  • This approach involves a dummy module in the original `ReplicatedStorage` location that redirects to the actual module in `ServerScriptService`.
  • Another developer primarily uses module scripts for server-side functions and relies on a networking library to send hashed data to the server to run functions.
  • The main reason for the unusual structure is a preference for having all code in one place, despite acknowledging it might not be the best practice.
Summarized from recent messages, might be inaccurate

More conversations

Talk, Play, &
Hang Out

Find your space to hang out, discuss the latest updates with the party chat, and see who's down to join your next match.
Get App