Hello Roblox developers! I need a bit of help with a script I am making, its a leaderboard that sees if your name matches the whitelisted names on my personal server / api.
For some reason, I can’t get the children from the JSON / table.
Can you probably help point me in the right direction and tell me what to do next time?
Even if the “:GetChildren()” were to function as you would have wished, the conditional statement would never equate to true since you would be comparing a string to a table.
It looks like your problem can be solved by simply using a table.find with the admins table. Example:
admincheckeven.OnServerEvent:Connect(function(plr)
if table.find(response.admins, plr.Name) then
...
end
end)
Im really confused on what your actual issue is. Are you trying to see if the player’s name can be found in the “response.admins” table? It seems like you’re having an issue that is unrelated to your original issue so provide more details on what problem you’re having and give us all context to your script
I originally had one issue. Which is about the response.admins table, now I have another issue where the “playercopy” doesnt appear on my leaderboard container when a username matches the ‘response.admins’ table.
I have found a better way to do this, rather than using an 3rd party HTTP service, I’m just going to do a ModuleScript with all of the admins names and userids of their accounts and save it to a Datastore.