Roblox UtilitiesDevlHub Roblox Documentation

Class

NetworkClient

NotCreatableServiceNotReplicated
Inherits
NetworkPeer › Instance › Object
Memory category
Instances

A service that manages a network connection's properties server.

This service is responsible for connecting a client to a server.

Events 2#

ConnectionAcceptedFired when the client successfully connects to a server. Returns a string showing the server's IP and port, and the client's ClientReplicator.
ConnectionFailedFired 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.

NameTypeDefaultDescription
peerstringThe server's IP and port.
replicatorInstanceThe client's ClientReplicator.

ConnectionFailed(peer: string, code: int)#

Fired if the client fails to connect to the server.

NameTypeDefaultDescription
peerstringThe server's IP and port.
codeintThe error code representing why the client failed to connect.

Inherited members#

Inherited from NetworkPeer 1
Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed