So I want to make this thing where it will show if your friends are playing like the one in meep city But I couldn't find anything on youtube Can someone help me?
✓ ANSWER ACCEPTED
How do i access friends from a player?
3 answers
✓ Accepted answer
if player:IsFriendsWith(playersuserid) then -- insert the userid of the player
1 comment
0
Ik btu i want a list of friends
Players:GetFriendsAsync returns a FriendPages that can be used to get the Player's friends. We need to make sure to pcall (protected call) the request, since it is requesting data from an external web server, which may be unsuccessful (in which case, the function will error):
local players = game:GetService("Players")
-- variant<FriendPages, nil> get_friends(Player player)
local function get_friends(player)
assert(typeof(player) == "Instance" and player:IsA("Player"), "bad argument #1 to get_friends")
local is_successful, friend_pages = pcall(players.GetFriendsAsync, players, player.UserId)
if not is_successful then
return nil
end
return friend_pages
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

5 comments
Try reading this: https://developer.roblox.com/api-reference/function/Players/GetFriendsAsync
https://developer.roblox.com/api-reference/function/Player/GetFriendsOnline
this is ur solution ezpz
well i cant mark this question anwserd as that is a comment
ill post an answer