What the localscript is supposed to do:
turn the dummy in workspace into one of the players friends
I get no errors in the output
the Dummy doesn’t turn into the players friend
Here is my localscript:
local usernames = {}
local friends = {}
local usernames = {}
local function iterPageItems(friendPages)
for item, pageNo in iterPageItems(friendPages) do
table.insert(usernames, item.Username)
table.insert(friends, item.Id)
end
local friends = {}
for item, pageNo in iterPageItems(friendPages) do
table.insert(friends, item.Id)
end
local randomFriend = friends[math.random(#friends)]
local npc = game.Workspace.npc
local newHumanoidDescription = game.Players:GetHumanoidDescriptionFromUserId(randomFriend)
npc.Humanoid:ApplyDescription(newHumanoidDescription)
end
local usernames = {}
local friends = {}
local usernames = {}
local function iterPageItems(friendPages)
for item, pageNo in iterPageItems(friendPages) do
table.insert(usernames, item.Username)
table.insert(friends, item.Id)
end
local friends = {}
for item, pageNo in iterPageItems(friendPages) do
table.insert(friends, item.Id)
end
local randomFriend = friends[math.random(#friends)]
local npc = game.Workspace.npc
local newHumanoidDescription = game.Players:GetHumanoidDescriptionFromUserId(randomFriend)
npc.Humanoid:ApplyDescription(newHumanoidDescription)
end
iterPageItems()