Get all friends from a player

Hey! i have a problem, im trying to get all friends from a player, but it prints blank, i have over 180 friends. its a local script, and i tested in studio and roblox. if you have any answers please tell me!

local Players = game:GetService("Players")
local plr = Players.LocalPlayer
local alreadySelectedFriends = {}
local Players = game:GetService("Players")

local plrFriends = Players:GetFriendsAsync(plr.UserId)
print(plrFriends)

hi!
GetFriendsAsync(ID) method retuns a FriendPage object which is the page object, so you cannot print in the developer console as you’ve must to get this current page.
you can find out how does this work here.

2 Likes
local friends = game.Players:GetFriendsAsync(game.Players.LocalPlayer.UserId):GetCurrentPage()

print(friends)
3 Likes

It was kind of my mistake, but also not

i used UserId and Name for the friends, i had to use Id and Username

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.