Service · inherits NetworkPeer
NetworkServer
A server-side service that manages all NetworkReplicator instances and
handles incoming client connections.
About NetworkServer
The NetworkServer stores all the NetworkReplicator in the game
and handles all connections. NetworkPeer.SetOutgoingKBPSLimit can be
used to imitate latency while using Start Server.
Methods 1
EncryptStringForPlayerId
(toEncrypt: string, playerId: int64) → stringEncrypts a string with the session key of the connection belonging to the player with the givenplayerId, returning the ciphertext.Encrypts
toEncryptusing the per-session encryption key of the connected player whosePlayer.UserIdequalsplayerId, then returns the ciphertext. Only that player's client can decrypt the result.This supports the encrypted-assets workflow: the server session-encrypts an asset encryption key for a single player, and that client decrypts and registers it through
ContentProvider.RegisterSessionEncryptedAsset(orContentProvider.RegisterDefaultSessionKey), so the raw key is never transmitted in plain text.Returns an empty string when no player with the given
playerIdis currently connected.
NetworkServer also has every member of NetworkPeer. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.