Staric14
(Dersty)
January 26, 2022, 9:27am
1
Why it doesn’t work?
game.ReplicatedStorage:WaitForChild("GetGamesFunc").OnServerInvoke = function(player)
local HttpGetRequest = HttpService:GetAsync("https://games.roproxy.com/v2/groups/------/games?accessFilter=Public&sortOrder=Asc&limit=100")
local FormattedRequest = HttpService:JSONDecode(HttpGetRequest)
local ReturnTable = {["data"] = {}}
for i,v in pairs(FormattedRequest.data) do
print(v.name)
local InsertTable = {
["id"] = v.id,
["name"] = v.name,
["description"] = v.description,
["rootPlaceId"] = v.rootPlace.id,
}
table.insert(ReturnTable.data, InsertTable)
end
return ReturnTable
end
Exquizzit
(Exquizzit)
January 26, 2022, 9:31am
2
We’re gonna need more than that. What’s the output saying? What do you want it to do?
Exquizzit
(Exquizzit)
January 26, 2022, 9:33am
3
Also, in the table.insert(), you’re inserting the data into a different table to the one you created. You created ReturnTable[“data”], but you’re inserting inserting data into ReturnTable.data
Staric14
(Dersty)
January 26, 2022, 9:37am
4
I’m just not call invoke function in local script
Apicphis
(Apicphis)
January 26, 2022, 9:37am
5
I’m not familiar with roproxy.com , but this looks like a place where you should put your Group ID.
Staric14
(Dersty)
January 26, 2022, 9:39am
6
yes, but…_____________________
Staric14
(Dersty)
January 26, 2022, 9:40am
7
It’s working successfully