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

Get Roblox Friendslist For Title/Avatar Help?

Asked by 6 years ago

So I've seen games getting avatars/names from my friends list and I want to do something like that. does it have to do with game.Players.LocalPlayer.Name or something? Please help.

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

I think they used this:

local player = game.Players.LocalPlayer

local dict = player:GetFriendsOnline(10) -- This gets there first 10 friends that are online

for i,friend in pairs(dict) do
    print(friend.UserName)
end

This is the roblox dev page for it https://developer.roblox.com/api-reference/function/Player/GetFriendsOnline

Ad

Answer this question