Zazetip
(Zaze)
November 8, 2022, 9:17am
1
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
TenBlocke
(Decablocks)
November 8, 2022, 10:03am
2
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
BadDad2004
(BadDad2004)
November 8, 2022, 12:29pm
3
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