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

Why doesn't my leaderboard function correctly?

Asked by 8 years ago

Here's the code it works for 1 player (assuming the topplr), but for some reason once I added the clean() function it just wont even display. I have 2 main problems, the leaderboard won't function correctly and it wont display at all when I want to clean it. It also doesn't want to update. There are no output errors, I checked and fixed them all.

01wait(5)
02local board = workspace.Fencing.SurfaceGui
03local list = board.plrslist
04local plr = script.name
05local posy = 1
06local topplr
07 
08function clean()
09    for _,v in pairs(list:GetChildren()) do
10        if v.Name == "name" then
11            v:Destroy()
12        end
13    end
14end
15 
View all 52 lines...
0
By 1 player I mean the first player that joins the game. Swordlust 15 — 8y
0
Try adding a delay in your while loop (e.g. while wait(10) do). The leaderboard is clearing itself right after it updates, which explains why nothing is showing. Spongocardo 1991 — 8y
0
it shows but it doesnt update the 2nd time meaning it shows the first time then it just doesnt want to work anymore Swordlust 15 — 8y

Answer this question