NPC from friendlist

it has been a long time since I posted.
so… I was wondering how do I make a script that can read peoples friend list and turn it into an NPC (That moves) , like some tycoon games
Ex:
Mall tycoon, Water park tycoon

any help is appreciated, thank you in advance

1 Like

When a player joins, make an http get request to get an array of all the friends of the player to link (with a proxy) and cache it for the rest of the time they are in the server
https://friends.roblox.com/docs#!/Friends/get_v1_users_userId_friends

Once you have the list, decode it with HTTPService:JSONDecode() and iterate through the array and use the ‘id’ index from each sub table.

When you iterate through the array and get the id from the sub table, use
https://create.roblox.com/docs/reference/engine/classes/Players#GetHumanoidDescriptionFromUserId
And paste that humanoid description into a blank dummy.

1 Like

You dont need to use a proxy. You can just do a direct API call which is more efficient:

local success, friendPages = pcall(function() return Players:GetFriendsAsync(player.UserId) end)
1 Like