I wanted to make a game similar to Game Tracker but I can’t find a tutorial or way to get the place visits of a game. Anyone have any ideas?
you could save a number to a Datastore.
when a player visits then just grab the number from datastore, increment it by 1 and then save it.
I’m not trying to get how many times the player visits my game. I’m trying to get the total number of place visits a player has from their game or games, when they join my game.
Yes use Https service with the help of APIs
these are the current api for game - https://games.roblox.com/docs
View this thread for more info
list of all APIS;
https://accountsettings.roblox.com/docs
https://api.roblox.com/docs
https://auth.roblox.com/docs
https://avatar.roblox.com/docs
https://billing.roblox.com/docs
https://catalog.roblox.com/docs
https://chat.roblox.com/docs
https://develop.roblox.com/docs
https://friends.roblox.com/docs
https://games.roblox.com/docs
https://groups.roblox.com/docs
https://inventory.roblox.com/docs
https://notifications.roblox.com/docs
https://points.roblox.com/docs
https://presence.roblox.com/docs
I believe the Roblox Api can provide you with that information. But you can’t access the api from a Roblox game server. At least not directly… But you can use a proxy site.
Check out the api here: https://api.roblox.com/docs
And for the proxy site, try googling “Roblox api proxy”, it should show up
I don’t think you can collect visit data, I actually created an API a long time ago with glitch that scraps the Roblox web page of a user’s profile, and then sends all the data back to the origin of the request. It’s not the hardest thing to do, using cheerio and axios you can achieve this.
Also to correct @FastAsFlash_Dev you cannot call Roblox APIs from Roblox games. This is to prevent internal–DDoS, so even if there where to be a game-visits API, you’d need a proxy.
I’ve never used a proxy before nor know how to integrate one into a script.
Making a proxy is actually pretty simple. but making a web scraper is a bit higher level for some people. This would require knowledge of other programming languages than just LUA.
Okay so I checked the APIs and found that Games API v1 has a function that gets the game details but I don’t really understand how I script it and use a proxy to make it work.
Have you used the HTTP service before? It can be used to do https requests, and retrieve data from the web (for example an API).
You will need to http request the Roblox apis through a proxy. Its not too advanced, I believe you can find tutorials about it online
There’s a lot of phenominal tutorials on making proxies.
Make sure to check out these sources first, learn how to make it, and then use the basic knowledge of HTTP Service on Roblox to make this all work.
Best of luck!
I am too lazy to provide you the api but I’ll provide you one of them.
You would need to use an API to get all of the games or universes made by the Roblox user and then you can use this following API to get any sort of Information about the place.
https://games.rprxy.xyz/v1/games?universeIds=gameId here not placeid btw
Hope this helped you out also no need to do that proxy bs everyone’s talking about
rprxy is now shutdowned so It won’t work, only saying for people that don’t know
Do you know of any way today to collect Visit Data without Rprxy? I know of RoProxy, but it didn’t seem to work when I tried it. I got an HTTP 400 (Bad Request)
error.
Here’s the code I tried if anyone can figure it out:
local httpService = game:GetService("HttpService")
local gamesUrl = "https://games.roproxy.com/v2/users/"
local visitsUrl = "https://games.roproxy.com/v1/games?universeIds="
game.Players.PlayerAdded:Connect(function(player)
local gamesData = httpService:GetAsync(gamesUrl .. "/"..player.UserId.."/games?accessFilter=Public&sortOrder=Asc&limit=100")
gamesData = httpService:JSONDecode(gamesData)
gamesData = gamesData.data
local totalVisits = 0
for i=1,#gamesData do
local gameId = gamesData[i].id
local visitsData = httpService:GetAsync(visitsUrl..gameId)
visitsData = httpService:JSONDecode(visitsData)
visitsData = visitsData.data
totalVisits=totalVisits+visitsData[1].visits
wait()
end
print(totalVisits)
end)