Collapse Sidebar




This property describes the private server ID of the server, if the server is a private server.

If the server is not a private server then this property will be an empty string.

Private servers

Private servers refer to the following:

  • Articles/Creating a VIP Server on Roblox|VIP servers, private servers that can be purchased by players from the games page
  • Reserved servers, private servers created by the developer using TeleportService/ReserveServer

PrivateServerId vs JobId

The PrivateServerId of a server is different to the DataModel/JobId. The DataModel/JobId|JobId is the unique identifier of the current server instance.

Private servers (VIP or reserved servers) can have multiple server instances associated with them over time. This is because, although only one server instance can be running at once for a private server, new server instances can open and close as players join and leave the game. For example, no server instance is running when nobody is playing in the server. The PrivateServerId will be consistent across all of these server instances, the DataModel/JobId will be unique for each once.

See also

  • DataModel/PrivateServerOwnerId, a property describing the owner of a VIP server
  • TeleportService/ReserveServer, a function which creates a reserved server

Code Samples

Detecting Private Servers

DataModel/PrivateServerId and DataModel/PrivateServerOwnerId can be used to detect if the current server instance is a standard server, a VIP server or a reserved server.

local function getServerType()
	if game.PrivateServerId ~= "" then
		if game.PrivateServerOwnerId ~= 0 then
			return "VIPServer"
			return "ReservedServer"
		return "StandardServer"