Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Custom PlayerList Icon Issue ?

Asked by
AeRyZe 0
4 years ago
Edited 4 years ago
        players = game:GetService("Players")
        for i, plr in pairs(players:GetPlayers()) do
        for i, descendant in pairs(plr.PlayerGui.PlayerList.PlayerListContainer.ScrollList:GetDescendants()) do
        plr2 = game.Players:FindFirstChild(descendant.Name)
        if plr2.leaderstats.Guild.Value == 9 then
            descendant.UserFrame.Icon.Image = IconList["OracionSeis"]
        end
        end
        end

Tells me that 'plr2' is a nil value (probably because the loop is running only 1 time as Im the only 'plr', it finds only the first child that is a 'UIListLayout' but I cant figure how to fix this).

I'm trying to update EVERY player's icon of EVERY player's custom playerlist and I'm blocked at this point...

0
I might be wrong, but you have for i, plr in pairs() and for i, descendant in pairs(), and I'm THINKING you're using the same index values twice, which may cause a problem. Maybe change one of the i's to like, an a or something. Awesom3_Eric 157 — 4y
0
I don't really know because i can't test this out, but try changing the 'plr2 =' to 'local plr2 =' iiConstable_Subwayx 130 — 4y

Answer this question