so i have this script it gets about 100 badges from the player and in one post a guy said to use a loop and i also dont know how to change the data to int value.
here is the code:
game.Players.PlayerAdded:connect(function(player)
local leaderstats = Instance.new("Folder", player)
leaderstats.Name = "leaderstats"
local badges = Instance.new("IntValue", leaderstats)
badges.Name = "Badges"
local Http = game:GetService("HttpService");
local fetchBadges = function(userId, badgeLimit)
local Badges = Http:GetAsync("https://badges.rprxy.xyz/v1/users/" .. userId .. "/badges?limit=" .. badgeLimit .. "&sortOrder=Asc")
print(Badges)
toReturn = tonumber(Badges);
return toReturn
end;
fetchBadges(player.userId, 100)
badges.Value = toReturn
end)

1 comment
and what should the third parameter be exactly?