How to check if a game is public

I already posted there. No one’s responded as of yet.

Edit: I think they’re replying right now.

  1. Go To Home On the studio
  2. Go to Gamesettings
  3. Go To Permisions
  4. You will see what is the playability option the game is and you can change it if you like

They are asking how to check if a game is private or not using an in-game script, not manually.

1 Like


Does anybody know about how to do “authentication” with proxies? I do not know anything about them.

They’re trying to say that the isPlayable property cannot be accessed without authentication because checking whether or not a game is private or not depends on a player’s access, not globally.

As they have suggested, to check whether or not a game is private or not, create your own RoProxy Lite instance and modify the environment variables. Note that using this method will require your .ROBLOSECURITY cookie.

Also, you’ll see Heroku in one of the deploy options, DO NOT use Heroku as they have removed free plans last month.

Do you know if the other ones are free?

Edit: Also this is all too complicated for me. All I’m trying to do is make sure that the player doesn’t think that the game is broken if the “This game is restricted” popup appears. Maybe there’s just a way of hiding that popup? That too would do what I’m trying to achieve in the first place.

A hacky way of doing this:

local s = pcall(function()
    game:GetService("TeleportService"):TeleportAsync(math.random(1, 10000000), {player})
end)

while not s do
    s = pcall(function()
        game:GetService("TeleportService"):TeleportAsync(math.random(1, 10000000), {player})
    end)
end

Can you tell me what this script does exactly?

It teleports a player to a game with a random ID between 1 and 10 million; if the player isn’t teleported (for any reason), it attempts to teleport the player to a different game with a random ID between 1 and 10 million.

Well, I’m trying to look for a way to find out if a game is public or not, because this is kinda what my script does and I don’t want the player to think the game has been broken if the popup that says “This game is restricted” shows on screen.

1 Like

Tried Railway


Tried Render

Touched upon most of this in the RoProxy thread already, but worth mentioning for anyone else looking to do the same thing in the future:

No game/place detail APIs will return a simple “private” or “public” property, they return an “isPlayable” property based on your team create access, group roles, etc. Previously, the “isPlayable” property would return a value corresponding to the game’s privacy settings when unauthenticated - however a recent change means it now always returns false.

However, I thought of a (somewhat hacky) solution since then.

local HttpService = game:GetService("HttpService")

--works equivalently to your getUniverseData function, pretty self-explanatory
function getUniverseData(universeId)
	local response = HttpService:GetAsync("https://games.roproxy.com/v1/games?universeIds="..universeId)
	return HttpService:JSONDecode(response)
end

--get a list of public games created by a user or group
function getCreatorPublicGames(creatorType, creatorId)
	local endpoint = (creatorType == "User" and "https://games.roproxy.com/v2/users/%s/games?accessFilter=2&limit=50" or "https://games.roproxy.com/v2/groups/%s/games?accessFilter=2&limit=50")
	local response = HttpService:GetAsync(string.format(endpoint, creatorId))
	return HttpService:JSONDecode(response)
end

--return a boolean corresponding to the experience privacy
function isGamePublic(universeId)
	local creatorData = getUniverseData(universeId).data[1].creator
	
	local creatorGames = getCreatorPublicGames(creatorData.type, creatorData.id)
	
	for i, gameData in pairs(creatorGames.data) do
		if gameData.id == universeId then return true end
	end
	
	return false
end

--note that you should be generating game/universe ids as opposed to place ids, as typically only the root place is accessible.
local universeId = math.random(1, 1000000000)

print(isGamePublic(universeId))
4 Likes

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