MarolexJoin Date: 2012-12-17 Post Count: 1785 |
I posted this to scripting helpers a few days ago with no reply of decent quality.
https://scriptinghelpers.org/questions/8365/im-making-an-admin-panel-and-the-player-list-wont-update
-King Scrub |
|
MarolexJoin Date: 2012-12-17 Post Count: 1785 |
b1
-King Scrub |
|
MarolexJoin Date: 2012-12-17 Post Count: 1785 |
b2
-King Scrub |
|
MarolexJoin Date: 2012-12-17 Post Count: 1785 |
b3
-King Scrub |
|
MarolexJoin Date: 2012-12-17 Post Count: 1785 |
b4
-King Scrub |
|
MarolexJoin Date: 2012-12-17 Post Count: 1785 |
b5 -srsly
-King Scrub |
|
|
I honestly don`t know. I`ve heard something about Players.LocalPlayer.PlayerGui
Try working with that. |
|
MarolexJoin Date: 2012-12-17 Post Count: 1785 |
that's the same thing but with longer hierarchy.
-King Scrub |
|
|
MarolexJoin Date: 2012-12-17 Post Count: 1785 |
It's not a problem with how the code is written, it's either broken upon firing once or the events arent connecting.
-King Scrub |
|
MarolexJoin Date: 2012-12-17 Post Count: 1785 |
B6
-King Scrub |
|
triodeJoin Date: 2011-08-13 Post Count: 5844 |
i'm lazy to look at that link
just tell me
are you trying to add players or change a variable |
|
MarolexJoin Date: 2012-12-17 Post Count: 1785 |
the post reads:
So the gui will list the players in a server but it will not update upon a player leaving/joining unless you rejoin or reset.
any help?
here's the code to update it
~~~~~~~~~~~~~~~~~
local pos = 0
function update()
pos = 0
for k,v in pairs(frame.Plays:GetChildren())do
v:remove()
end
local players = game.Players:GetPlayers()
for i = 1, #players do
local label = Instance.new("TextLabel",frame.Plays)
label.Size = UDim2.new(0.425,0,0.04,0)
label.TextScaled = true
label.Text = players[i].Name
label.Position = label.Position + UDim2.new(0,0,pos,0)
pos = pos +.04
end
end
game.Players.PlayerAdded:connect(function(player)
update()repeat wait() until player.Character
player.Character.Humanoid.Changed:connect(function()
update()
end)
end)
game.Players.PlayerRemoving:connect(function()
update()
end)
update()
~~~~~~~~~~~~~~~~~
-King Scrub |
|
MarolexJoin Date: 2012-12-17 Post Count: 1785 |
B7
-King Scrub |
|
MarolexJoin Date: 2012-12-17 Post Count: 1785 |
Lets try this again, B8
-King Scrub |
|
MarolexJoin Date: 2012-12-17 Post Count: 1785 |
Bee Nine
-King Scrub |
|
doneyesJoin Date: 2008-03-21 Post Count: 3466 |
Add a print after ever few lines and narrow it down to find the line that's not letting it happen. |
|
methinoJoin Date: 2008-08-25 Post Count: 289 |
for i = 1, #players do
local label = Instance.new("TextLabel",frame.Plays)
label.Size = UDim2.new(0.425,0,0.04,0)
label.TextScaled = true
label.Text = players[i].Name
label.Position = label.Position + UDim2.new(0,0,(i-1)*0.4,0)
end |
|
methinoJoin Date: 2008-08-25 Post Count: 289 |
sorry, typo
for i = 1, #players do
local label = Instance.new("TextLabel",frame.Plays)
label.Size = UDim2.new(0.425,0,0.04,0)
label.TextScaled = true
label.Text = players[i].Name
label.Position = UDim2.new(0,0,(i-1)*0.4,0)
end |
|
MarolexJoin Date: 2012-12-17 Post Count: 1785 |
Thanks for replying but no, that's just re-positioning the text label to a place i dont want.
-King Scrub |
|
MarolexJoin Date: 2012-12-17 Post Count: 1785 |
B10
-King Scrub |
|
MarolexJoin Date: 2012-12-17 Post Count: 1785 |
B11
-King Scrub |
|
MarolexJoin Date: 2012-12-17 Post Count: 1785 |
B12 GUIS
-King Scrub |
|
MarolexJoin Date: 2012-12-17 Post Count: 1785 |
B13
-King Scrub |
|
Bebee2Join Date: 2009-05-17 Post Count: 3985 |
I'll help you directly on the website. |
|