I made a player statistics GUI, and I got the account age working, but I can’t figure out how to get a player’s friend count.
I already looked through the old and new Creator Documentations, but it seems that the player:GetFriendsAsync() is somewhat deprecated? (it doesn’t say that, but seeing as there is no other documentation about it, I assume it is.)
Is there an easier way to do this or is it just impossible?
Any help is appreciated, thanks!
This is the better solution as it doesn’t require the ‘HttpService’.
local Game = game
local Players = Game:GetService("Players")
local Success, Result = pcall(function() return Players:GetFriendsAsync(261) end)
if Success then
local Friends = 0
while true do
Friends += #Result:GetCurrentPage()
if Result.IsFinished then break else Result:AdvanceToNextPageAsync() end
end
print(Friends) --98
else
warn(Result)
end