local k=Players:GetFriendsAsync(userId)local w={}for k,u in iterPageItems(k)do table.insert(w,k.Id)end local u={}for k,w in iterPageItems(k)do table.insert(u,k.Username)end local R=math.random(#w)local y=w[R]local r=game.Players:GetHumanoidDescriptionFromUserId(y)local l=script.Parent l.Humanoid:ApplyDescription(r)
-- Then, get a FriendPages object for their friends
local friendPages = Players:GetFriendsAsync(userId)
local friends = {}
for item, pageNO in iterPageItems(friendPages) do
	table.insert(friends, item.Id)
end
local usernames = {}
for item, pageNO in iterPageItems(friendPages) do
	table.insert(usernames, item.Username)
end
local random = math.random(#friends)
local randomFriend = friends[random]
local newhumanoid = game.Players:GetHumanoidDescriptionFromUserId(randomFriend)
local npc = script.Parent
npc.Humanoid:ApplyDescription(newhumanoid)
