About
Flux is a networking library for Roblox. It replaces directRemoteEvent,
UnreliableRemoteEvent and RemoteFunction usage with a small, strictly typed API.
Rather than creating one remote per message, Flux sends every event through a single
RemoteEvent and UnreliableRemoteEvent pair. Payloads are packed into a buffer,
batched once per frame, and unpacked on the other side, so you write declarative
Luau and never touch a cursor yourself.
Install Flux
Drop the module into
ReplicatedStorage and you’re done.Quickstart
A working server and client in under twenty lines.
Guides
Events, invocations, schemas, generics and lifecycle.
API Reference
Every function, type and namespace Flux exposes.
Features
Fast
Buffer serialization with pooled readers and writers, so steady traffic reuses
allocations instead of churning them.
Type safe
Written in
--!strict Luau. The generic Server<Args..., Out...> and
Client<Args..., Out...> types give you real autocomplete on both ends.Compact
Varint lengths, integer width narrowing, and a two-bit packet header. Adding a
schema drops the per-value type tags too.
Reliable and unreliable
Every event carries both channels out of the box. There is no second object to
create; call
Fire or FireUnreliable.Automatic batching
Sends made within a frame coalesce into one buffer per recipient and flush on
Heartbeat, collapsing dozens of remote calls into one.Small API
Connect, Once, Wait, Fire, Invoke. Declarative syntax that gets out of
your way.At a glance
Contributing and Feedback
Flux is actively developed, and help is welcome in three areas.Testing
Testing
The dynamic encoder has a lot of branches, and the batching layer has timing
behaviour that is easy to get subtly wrong. Coverage for the edge cases is the
most valuable contribution: deeply nested tables, mixed array and dictionary
shapes, players leaving mid-flush, invoke timeouts.
Improvements
Improvements
Suggestions or PRs that improve throughput, shrink packets, or make the API
harder to misuse. The Limits page lists the rough edges that
are known and unclaimed.
Bug fixes
Bug fixes
Identifying and fixing issues as they surface. A minimal reproduction in a place
file is worth far more than a description.
