PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

PrivateServerOwnerId

DataModel

int64

This property describes the Player/UserId|UserId of the Player that owns the Articles/Creating a VIP Server on Roblox|VIP server if the server is a VIP server.

If the server is a standard or reserved server then this property will be set to 0.

This property could be used to identify if a Player is the owner of the VIP server, for example:

local Players = game:GetService("Players")

-- is this a VIP server?
if game.PrivateServerId ~= "" and game.PrivateServerOwnerId ~= 0 then

    -- listen for new players being added
    Players.PlayerAdded:Connect(function(player)

        -- check if the player is the server owner
        if player.UserId == game.PrivateServerOwnerId then
            print("The private server owned has joined the game")
        end
    end)
End

See also

  • DataModel/PrivateServerId, a property describing the unique ID of VIP and TeleportService/ReserveServer|reserved servers

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"
		else
			return "ReservedServer"
		end
	else
		return "StandardServer"
	end
end