If there is a possible way for a script to see if a number init64 is a valid PlaceID please let me know because it is needed.
✓ ANSWER ACCEPTED
How to I check if an ID init64 is a valid PlaceID?
1 answer
✓ Accepted answer
function IsGameValid(id)
local isgame
local success,message = pcall(function()
local gameid = game:GetService('MarketplaceService'):GetProductInfo(id)
isgame = gameid.AssetTypeId == 9
end)
return success and isgame
end
This function returns whether the given ID is a game. If you wanted to do something if this is true then you would do this:
if IsGameValid(1) then --Change 1 to an ID.
--Code here
end
Hope this helped!
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Sorry, forgot to make the function check if it was a game. I edited my answer so now it should work properly.