测试与安全

roblox-networking

el4cteo/roblox-skills

Client-server communication - RemoteEvent, UnreliableRemoteEvent, RemoteFunction, what survives serialization, typed remote modules, server validation and rate limiting, bandwidth (deltas, buffers, batching), synced time, Zap/Blink. Use when adding remotes, syncing state to clients, debugging nil/lost remote arguments, or reducing lag and bandwidth.

  • 521 次安装
  • 55 星标
  • 收录于

安装命令

npx skills add https://github.com/el4cteo/roblox-skills --skill roblox-networking

SKILL.md

Roblox networking

Pick the right channel

Channel Delivery Use for
RemoteEvent Reliable, ordered Requests (client→server), game events, UI updates. The default.
UnreliableRemoteEvent May drop or reorder; payload ≤ 1000 bytes (larger payloads are dropped) Continuous, superseded-by-next data: aim direction, cosmetic VFX, positions of non-physics objects.
RemoteFunction Request/response, yields caller Client→server queries that need an answer (e.g. "can I buy X?").
Attributes / properties Automatic replication server→client Persistent state clients read (health, team, round state).
Physics replication Automatic for owned assemblies Moving parts; see roblox-physics.

Never use RemoteFunction:InvokeClient: if the client errors, disconnects, or never returns, the server throws or yields forever. Use a RemoteEvent to the client and another back if you need a reply.

Defining remotes once (typed)

Create remotes on the server; clients wait for them. Centralize names so typos can't happen.