Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can I get a list of a users friends?

Asked by 9 years ago

How can I get a list of somebody's friends? I know I will probably need to use HttpService but I do not know of an api that I can get friends from.

0
Try using Player:IsFriendsWith(<USERID>) MessorAdmin 598 — 9y
0
Maybe write your own API (if you know how to) or just wait until one becomes available (I'm sure it will eventually). Tkdriverx 514 — 9y

1 answer

Log in to vote
0
Answered by
yumtaste 476 Moderation Voter
9 years ago

Technically, you can't get a list of users' friends at the moment, but someone might make a new HttpService API so you can. You can use the :IsFriendsWith(userId) method to see if someone is friends with a user. Example:

game.Players.PlayerAdded:connect(function(player)
if player:IsFriendsWith(16099777) then --replace 16099777 with your user ID
print(player.Name.." is friends with bobafett3544!")
end
end)
Ad

Answer this question