Roblox Networking

TabooHarmony/roblox-brain/skills/core/roblox-networking

作者 TabooHarmony38826be57ee37bcf023e9c2b85681bea3909281c无许可证收录于 2026年10月9日更新于 2026年10月9日

Use when validating RemoteEvent or RemoteFunction arguments, adding rate limits, designing server-authoritative systems, or preventing exploits.

AI 生成的概览

指导 Roblox 开发者校验远程事件参数、设置速率限制并采用服务器权威网络模型。

功能
提供 Roblox 客户端-服务器网络方面的参考指导:校验 RemoteEvent 与 RemoteFunction 参数、选择权威模型、规划负载大小与触发频率,以及处理序列化特性。内容还涵盖速率限制、可疑行为记录和编辑模式下的回环模拟。配套参考文件包含详细的校验、限流与模拟模式。
适用场景
适用于新增或审查 Roblox 远程调用、处理不可信的客户端输入、添加冷却或速率限制,或分配服务器权威时。也适用于设计服务器权威系统或防止漏洞利用。
运行要求
不含脚本,仅为说明文档。需要访问随附的参考文件 references/full.md。

roblox networking

When to Load

Load when adding a remote, handling untrusted input, adding cooldowns, or assigning authority.

Quick Reference

  • Every client argument is attacker-controlled; validate type, size, ownership, state, distance, cooldown on the server.
  • Look up prices, damage, rewards, permissions from server-owned definitions.
  • Choose the authority model first: Server Authority uses client prediction + server rollback, and is not SetNetworkOwner.
  • Under Server Authority, simulation input uses InputAction/BindToSimulation(), not a RemoteEvent.
  • Events for most gameplay requests; keep RemoteFunction calls short and bounded.
  • RemoteEvent for reliable state; not ordered vs property/attribute replication — use one explicit channel or version state. UnreliableRemoteEvent only for replaceable data (VFX, snapshots).
  • Unreliable is not automatically faster: unordered, droppable, 1000-byte payload cap.
  • Measure payload size and fire rate under load; estimators are not an official wire-format spec.
  • Budget rate × bytes × recipients; snapshot on join, diffs after. Measure encoded payloads.
  • Hit timestamps are untrusted context, never proof. Bound freshness and validate server history; see full.md §3a.
  • Typed schemas do not replace security checks. Pin generators and verify generated output in CI.
  • Check NaN/infinity first (x ~= x, math.abs(x) == math.huge): NaN defeats </>. utf8.len catches malformed UTF-8 that fails a DataStore save.
  • Serialization: functions arrive nil, metatables stripped, mixed keys mangled, nil truncates tables, tables are copies — validate field by field, share state via server-owned snapshots/ids.
  • Server Authority needs AuthorityMode = Server + its bundle (NextGenerationReplication, PlayerScriptsUseInputActionSystem, deferred signals, UseFixedSimulation, StreamingEnabled); misprediction/rollback are normal (full.md).
  • Rate limits protect the server; validation still rejects invalid requests.
  • Record suspicion with thresholds; never punish one malformed packet.
  • Edit-mode play: wrap the network layer so RunContext:IsEdit() gets a loopback mock (full.md).

Need details? references/full.md has validation, throttling, and mock patterns.

来源与署名

来源:TabooHarmony/roblox-brain位于skills/core/roblox-networking提交38826be

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架