UI For Private Server's Only

Hey!

I’m wondering how I can make a button that’s only visible in a private server. I have made a custom private server system for my roblox game, and I’d like to add a button that only shows in a private server

I just don’t know how to address the private server

Each server contains information related on its nature. Fortunately for you, there is information on whether or not the server is a private server. You can discern this by comparing DataModel.PrivateServerId to an empty string:

local isPrivate = game.PrivateServerId ~= ""

You can expand on this with DataModel.PrivateServerOwnerId to check if the server is a reserved server (a private server owned by nobody)

local isReserved = game.PrivateServerId ~= "" and game.PrivateServerOwnerId == 0

You can use either of these booleans as the state for your GuiObject’s “Visible” property, or your ScreenGui’s “Enabled” property

THANK YOU!!! I’ve been sitting here for hours :sob:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.