Flux.Server(name) on the server and
Flux.Client(name) on the client with the same name, and the two objects are
connected.
The name is the channel identifier. It is written into every packet as a
length-prefixed string, so both sides have to agree on it exactly. Matching is
case-sensitive.
Server example
ServerScriptService/Example.server.luau
Client example
StarterPlayerScripts/Example.client.luau
Reliable and unreliable delivery
Every Flux event carries both channels. There is no second object to create, so pick the method that matches the message.Client-to-server invocations
An invocation is a round trip. The client sends a request, the server’sOnInvoke
handler runs, and its return values come back to the caller.
Client:Invoke errors if the server handler errors or if the request times out, so
wrap it when failure is expected:
Adding a schema
Passing a schema replaces the dynamic encoder with a fixed layout. It removes the per-value type tag from every argument and narrows numbers to the width you declare.Schemas
Fixed layouts, composites, and when they pay off.
Generics
Get real autocomplete on
Fire, Connect and Invoke.