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

Custom player list not working? Need help ASAP.

Asked by 6 years ago

So basically, I've been trying to make this custom playerlist but for whatever reason, it doesn't work. Here is the script. Help would be great.

wait(.1)
Main = script.Parent.MainFrame
PL = Main.PlayerList

Pos = 15


function upd()
    getall = PL:GetChildren()

    for i=1, #getall do
        getall[i].Position = UDim2.new(0, 0, 0, Pos)
        PL.CanvasSize = UDim2.new(0, 0, 0, Pos)
        Pos = Pos + 120
    end
    Pos = 0
end

game.Workspace.Players.ChildAdded:connect(function(plr)
wait(.1)
    Frm = Instance.new('Frame', script.Parent.MainFrame.PlayerList)
    Frm.Name = plr.Name
    Frm.Size = UDim2.new(0.96, 0, 0, 120)
    Frm.Position = UDim2.new(0, 0, 0, 0)
    Frm.BackgroundTransparency = 1

    IL = Instance.new('ImageLabel', Frm)
    IL.Name = plr.Name
    IL.Image = 'https://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=' ..plr.Name
    IL.Size = UDim2.new(0, 100, 0, 100)
    IL.Position = UDim2.new(0, 10, 0, 13)


    TL = Instance.new('TextLabel', Frm)
    TL.Text = plr.Name
    TL.BackgroundTransparency = 1
    TL.Position = UDim2.new(0.325, 0, 0.1, 0)
    TL.Size = UDim2.new(0, 250, 0, 50)
    TL.Font = 'Cartoon'
    TL.FontSize = 'Size14'
    TL.TextScaled = true
    TL.TextWrapped = true
    TL.TextXAlignment = 'Left' 
    TL.TextColor3 = Color3.new(255, 255, 255)
    upd()
end)





wait(.1)

game.Workspace.Players.ChildRemoved:connect(function(plr2)
wait(.1)
if PL:FindFirstChild(plr2.Name) then
    PL[plr2.Name]:remove()
    upd()
end

end)
0
One thing is change it from child added to player added, other wise is there any errors? Earthkingiv 51 — 6y
0
No errors just mistake: So on line 13, You made it so the frames is "0, 0, 0, NUMBER". That means you wouldn't see the GUI on the X axis. thesit123 509 — 6y

Answer this question