Start typing to search packages!
networker
By @thepigeonsstudio
Roblox
Mirrored from WallyNetworker
A lightweight, type-safe communication library for Roblox built with Strict Luau.
Networker provides a clean, object-oriented wrapper around Roblox's RemoteEvent and UnreliableRemoteEvent, making networking simple, organized, and easy to use.
Features • Installation • Remotes • API • License
Features
- 🚀 Lightweight and easy to use
- 🔒 Written in
--!strict - 📡 Supports
RemoteEvent - ⚡ Supports
UnreliableRemoteEvent - 🔄 Client and server compatible
- 📨 Fire events between the client and server
- 🔗 Built-in event connection helpers
- 🛡️ Runtime validation with descriptive error messages
- 📦 Wally package support
Installation
Install using Wally:
[dependencies]
Networker = "thepigeonsstudio/networker@2.0.1"
Then install your dependencies:
wally install
Remotes
Networker supports both RemoteEvent and UnreliableRemoteEvent with the same simple API.
RemoteEvent
Creating a Remote
Server
local Networker = require(Packages.Networker)
Networker.init()
local Chat = Networker.newRemote("Chat")
Getting a Remote
Client
local Networker = require(Packages.Networker)
Networker.init()
local Chat = Networker.getRemote("Chat")
Sending Events
-- Client → Server
Chat:FireServer("Hello Server!")
-- Server → Client
Chat:FireClient(player, "Hello Client!")
-- Server → All Clients
Chat:FireAllClients("Welcome!")
Listening for Events
Server
Chat:OnServerEvent(function(player, message)
print(player.Name, message)
end)
Client
Chat:OnClientEvent(function(message)
print(message)
end)
UnreliableRemoteEvent
UnreliableRemoteEvent is designed for high-frequency data where occasional packet loss is acceptable.
Examples include:
- Character movement
- Camera updates
- Aim direction
- Visual effects
- Cosmetic updates
Creating an Unreliable Remote
Server
local Position = Networker.newUnreliableRemoteEvent("Position")
Getting an Unreliable Remote
Client
local Position = Networker.getUnreliableRemote("Position")
Sending Events
Position:FireServer(...)
Position:FireClient(player, ...)
Position:FireAllClients(...)
Listening for Events
Server
Position:OnServerEvent(function(player, ...)
print(player)
end)
Client
Position:OnClientEvent(function(...)
print(...)
end)
API
| Function | Description |
|---|---|
Networker.init() | Initializes Networker. |
Networker.newRemote(name) | Creates a new RemoteEvent. |
Networker.getRemote(name) | Gets an existing RemoteEvent. |
Networker.newUnreliableRemoteEvent(name) | Creates a new UnreliableRemoteEvent. |
Networker.getUnreliableRemote(name) | Gets an existing UnreliableRemoteEvent. |
:FireServer(...) | Fires an event to the server. |
:FireClient(player, ...) | Fires an event to a specific client. |
:FireAllClients(...) | Fires an event to every client. |
:OnServerEvent(callback) | Connects a callback to OnServerEvent. |
:OnClientEvent(callback) | Connects a callback to OnClientEvent. |
Contributing
Contributions, bug reports, feature requests, and pull requests are welcome!
If you discover a bug or have an idea for improving Networker, feel free to open an issue or submit a pull request.
License
This project is licensed under the MIT License.
Made with ❤️ by ThePigeonsStudio
Package Details
Install command (Click to copy)
Version
2.0.1
License
MIT
Safe for commercial use
License identified from the packaged LICENSE file; the manifest declared none.
Automated license review — not legal advice.
