Version: 3.0.9
Scoping with namespaces
As your game grows, so too will your definitions file. To better organize your networking definitions, RbxNet introduces a concept called "Namespaces".
Namespaces are like sub-definitions. They can also be stored in separate files to be included in the main definition file.
#
Creating a namespaceGoing by our previous example, say we want to separate up inventory and equipment remotes into separate files:
- roblox-ts
- luau
shared/remotes.ts
src/shared/remotes.lua
Then simply, if you want to do the same fetch:
#
Usage from the server- roblox-ts
- luau
server/main.server.ts
src/server/main.server.lua