Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make global game stats?

I'd like to see how many minigames have been loaded altogether I'd like to do something like a global value that gets the data from each server does anyone know how to do that?

3 comments

0

HttpService

0

or datastore ^^

0

Yes, but how do I make a global value with httpservice

2 answers

✓ Accepted answer

do this in the script that loads the minigames

local key = 1234 -- put anything here
local ds = game:GetService("DataStoreService"):GetDataStore("Put anything here")


function UpdateValue()
if ds:GetAsync(key) then
ds:SetAsync(key, ds:GetAsync(key) + 1)
end
end

-- when a new minigame starts do this
UpdateValue()

This discussion is preserved as it was. New answers, comments, and votes are closed.