Class
NetworkClient
NotCreatableServiceNotReplicated
A service that manages a network connection's properties server.
This service is responsible for connecting a client to a server.
Events 2#
| ConnectionAccepted | Fired when the client successfully connects to a server. Returns a string
showing the server's IP and port, and the client's
ClientReplicator. |
| ConnectionFailed | Fired if the client fails to connect to the server. |
ConnectionAccepted(peer: string, replicator: Instance)#
Fired when the client successfully connects to a server. Returns a string
showing the server's IP and Port, and the client's
ClientReplicator.
| Name | Type | Default | Description |
|---|---|---|---|
peer | string | The server's IP and port. | |
replicator | Instance | The client's ClientReplicator. |
ConnectionFailed(peer: string, code: int)#
Fired if the client fails to connect to the server.
| Name | Type | Default | Description |
|---|---|---|---|
peer | string | The server's IP and port. | |
code | int | The error code representing why the client failed to connect. |
Inherited members#
Inherited from NetworkPeer 1
Methods (1)
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