i want to print out the ammount of players in my game but i dont know how to do that, i found this script but i dont know how to use it:
local body = game:GetService("HttpService"):JSONDecode(res) --res would be the response from the server
local playerCount = body.data[1].playing
print(playerCount)
i also get an error Argument 1 missing or nil in Line 1

8 comments
get an error at line 18 saying "attempt to index nil with 'data'"
Try GetGameData().playing instead , im on mobile right now so i cant test it.
Or maybe we fail to get the data i guess :/
nope same thing just the data is replaced with playing "attempt to index nil with 'playing'"
Ok so I check the URl and nothing there, maybe it is Roblox side issue. You can check the sample URL here and you can see, there is nothing: https://games.roblox.com/v1/games?universeIds=4789013654
ok so do i just wait for roblox then?
Yeah, just waiting :| . It Roblox issue, I dunno how to fix it :V
oof, ok thx anyways ;-;