I’m using @Froast’s ProxyService but I’m stuck at using the data.
The script works, but the value it’s returning is this:
As you can see, how would I be able to collect only the Player’s VisitorId and LastOnline data?
I’m using @Froast’s ProxyService but I’m stuck at using the data.
The script works, but the value it’s returning is this:
As you can see, how would I be able to collect only the Player’s VisitorId and LastOnline data?
Get the VisitorId key inside that array and print it.
print(tostring(table[key]))
You need to use the HttpService:JSONDecode(get)
which converts it into a lua table.
Edit: You can find the reference here
I’ve already mentioned that I’m using Froast’s ProxyService. And it looks like JSONDecode is used, but it still returns it as this.
If its printing this it doesn’t seem to be using the JSONDecode.
If you compare the API example to your print it doesn’t look like it is.
I also noticed in one of his examples he has a .body at the end, I don’t know if this applys to what your doing.
Since I believe you’re already in the module, what do you think I should change?
Because I can’t think any other way to get the data other than using string manipulation
You can try using the JSONDecode then print and see if it changes what prints out.
Unfortunately no, it doesn’t work.
What did it print and can you show the code?
Edit: You want it to print this essentially Screenshot by Lightshot
Unfortunately, you’re partially correct. There was some keys missing though, like the GameId and PlaceId.
Inconveniently I have to get off,
Try using a for i,v loop and go through the table and print the loop results.
I will try and further assist you when available.
They were null/“nil” because the player wasn’t ingame. In Lua, when a key is nil, it’s as though it does not exist in that table, so it won’t show up in a print/for loop.