Forest Logo
search
package_2

remotemanager

By @ptekspy

Roblox

Mirrored

RemoteManager

RemoteManager is a small Roblox Luau module for ensuring remote objects exist and are exposed from a shared ReplicatedStorage.RemoteManager container.

This package loads remote event and function names from the local ReplicatedStorage.RemoteManager.Events and ReplicatedStorage.RemoteManager.Functions modules, creates missing remote instances on the server, and returns a shared table with the resolved remote objects.

Features

  • Automatically creates missing RemoteEvent and RemoteFunction instances on the server
  • Uses a single init module to expose shared remote objects
  • Supports local client access by waiting for existing remote objects when not running on the server

Installation

Install the package with wally:

wally add ptekspy/RemoteManager

Requirements

  • Roblox game with ReplicatedStorage
  • A RemoteManager folder inside ReplicatedStorage
  • A child folder Events with a module named Events
  • A child folder Functions with a module named Functions

Each module should return an array of string names for the remotes to load.

Folder structure

The package expects the following runtime structure in ReplicatedStorage:

ReplicatedStorage
└── RemoteManager
    ├── Events
    │   └── Events (ModuleScript returning an array of event names)
    └── Functions
        └── Functions (ModuleScript returning an array of function names)

Usage

Require the package module from your Luau code:

local RemoteManager = require(path.to.RemoteManager.init)

After loading the module, the returned table contains:

  • RemoteManager.Root - the script folder used as the root in the package
  • RemoteManager.EventsFolder - the ReplicatedStorage.RemoteManager.Events folder
  • RemoteManager.FunctionsFolder - the ReplicatedStorage.RemoteManager.Functions folder
  • RemoteManager.<EventName> - a RemoteEvent instance for each event name returned by the Events module
  • RemoteManager.<FunctionName> - a RemoteFunction instance for each function name returned by the Functions module

Example:

local RemoteManager = require(path.to.RemoteManager.init)

local playerJoinEvent = RemoteManager.PlayerJoined
local getProfileFunction = RemoteManager.GetProfile

playerJoinEvent:FireClient(player)
local result = getProfileFunction:InvokeClient(player)

Server and client behavior

  • On the server, missing remotes are created automatically in the appropriate folder.
  • On the client, the module waits for the remote instance to appear if it is not already present.

Development

This package is a Luau module located in src/init.luau and is configured for use with wally.

License

Apache-2.0

Package Details

Install command (Click to copy)


Version

1.0.1

License

Apache-2.0

check_circle

Safe for commercial use

infoModified files must carry a notice of changes. If the package ships a NOTICE file, its attributions must be preserved.

Automated license review — not legal advice.