Hello!
I am currently making a game that will display the TOP SURVIVORS name on the top of the screen, but it is not working .Here's what I have so far:
h = Instance.new("Hint")
h.Parent = game.Workspace
highscore = 0
highscorename = "Nobody"
while true do
wait(0.01)
local l = game.Players:children()
for i=1,#l do
local bounce = l[i].leaderstats:findFirstChild("Seconds")
if (bounce ~= nil) then
if (bounce.Value > highscore) then
highscore = bounce.Value
highscorename = l[i].leaderstats.Parent.Name
h.Text = "Server's longest survivor: "..highscore..", made by: "..highscorename.."!"
end
end
end
end
I know I am missing something. Any help would be appreciated, TY
-JIP

1 comment
:Children() is deprecated, dont use it