Hello! I’m a beginner scripter trying to make a script for a game!
- What do I want to achieve?
I want to get all the players in the game and get their following count to put in the player’s leaderstats folder.
- What is the issue?
The issue is that I don’t know how to get the userid of the player inside the game and put in the url (check below in example lua script) and then put the result in a player’s leaderstats.
- What solutions have I tried so far?
I tried looking in devforum to find others with similiar issues but I couldn’t really find any. And I’ve also tried learning more about httpservice because I don’t know all it’s proper functions yet,
for _, player in pairs(game.Players:GetPlayers()) do
table.insert(userIds, player.UserId)
end -- getting user userid from all players in the game and putting it in a table
local url = https://friends.roproxy.com/v1/users/%s/followings/count)
local HttpService = game:GetService("HttpService")
Any help would be much appreciated!