How to check if a game is public

Also correct me if I’m wrong, but ProxyService requires Heroku to work properly, but they stopped accepting free plans last month, so don’t use ProxyService unless if you’re willing to pay for it.

As for the OP, you’re going to have to look for other proxy options in order to accomplish this. Proxies and HttpService is the only way you can accomplish this.

How do I get a proxy?
I do not know much about httpservice and proxies.

Sorry for the late response! I can’t sepcifically direct you to a proxy, but here is a list of proxies posted on the DevForum.

Alright so I’m trying to use RoProxy for this, and I just copied the code from the post that @V_ersalty suggested but I changed the links.

Can somebody help me? I am so confused.

Code:

game.ReplicatedStorage.AskServer.OnServerEvent:Connect(function(_, ID)
	local HttpService = game:GetService("HttpService")

	--make a proxy or use a public one to make it work
	local function Proxy(url) 
		return url 
	end

	local function GET(url)
		url = Proxy(url)
		local result
		local Success, Error = pcall(function()
			result = HttpService:GetAsync(url)
			result = HttpService:JSONDecode(result)
		end)
		if Success then 
			return result 
		else 
			warn(Error)
		end
	end

	local function getPlaceData(placeId)
		local endpoint = "https://games.roproxy.com//v1/games/multiget-place-details?placeIds="..placeId 
		return GET(endpoint)
	end

	local function getUniverseData(universeId)
		local endpoint = "https://games.roproxy.com//v1/games?universeIds="..universeId
		return GET(endpoint)
	end

	 --your place id

	local PlaceData = getPlaceData(ID)
	local universeId, isPrivate = PlaceData.universeId, PlaceData.isPlayable

	print("game private:", isPrivate) 

	local UniverseData = getUniverseData(universeId) 
	local uncopylocked = UniverseData.copyingAllowed 

	print("uncopylocked:", uncopylocked)
end)

You might want to report this in the RoProxy thread. It appears this “Unathorized” bug is likely their issue since the multiget-place-details Roblox API works fine.

Should I make a separate topic for this?

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))
3 Likes

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