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 從公開儲存庫中收錄這些內容。

檢舉或申請下架