PlayerConnect (Method)

From Legacy Roblox Wiki
Jump to navigationJump to search
Protected:This item is protected. Attempting to use it in a Script or LocalScript will cause an error.
PlayerConnect( int userId, string server, int serverPort[, int clientPort, int threadSleepTime] )
Returns Instance player
Description: Connects the Roblox client to the given server
Member of: NetworkClient


Example
-- Will allow you to connect to the game server with the correct security context

print(game:GetService("NetworkClient"):PlayerConnect(0, "localhost", 53640)) --> Player