Class
NetworkReplicator
NotCreatableNotReplicated
An object which handles the replication of other objects either from the server to the client, or from the client to the server.
Each NetworkReplicator corresponds to a single network connection between
two peers and serializes, transmits, receives, and applies the stream of data
model changes (new instances, property and attribute changes, event
invocations, and instance removals) that keeps those peers in sync. It is the
base class for the two concrete replicators: a ServerReplicator runs
on the server and replicates between the server and the connected client,
while a ClientReplicator runs on a client and replicates between that
client and the server. A NetworkReplicator is created and managed by the
engine automatically as clients connect and disconnect, and is not
instantiated or manipulated by creator scripts.
Methods 1#
| GetPlayer | Returns the player that is connected to the NetworkReplicator. |
GetPlayer(): Instance#
Returns the Player associated with the connection that this
NetworkReplicator serves. On a ServerReplicator, this is the
remote client's player; on a ClientReplicator it is the local
player. Returns nil if the replicator has no target player, such as
before the connection has been assigned a player or after it has been torn
down.
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild