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.
COMMUNITY QUESTION
Get Roblox Friendslist For Title/Avatar Help?
1 answer
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
This discussion is preserved as it was. New answers, comments, and votes are closed.
