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

Why doesnt this work? Stats script and global leaderboard script.

Asked by 5 years ago

This question has been solved by the original poster.
01local DataStore = game:GetService("DataStoreService") -- stats script
02 
03 
04 
05local ds1 = DataStore:GetOrderedDataStore("Survivals")
06local ds2 = DataStore:GetOrderedDataStore("TopSurvivals")
07 
08game.Players.PlayerAdded:Connect(function(player)
09 
10 
11 
12    local leaderstats = Instance.new("Folder", player)
13    leaderstats.Name = "leaderstats"
14 
15    local survivals = Instance.new("IntValue", leaderstats)
View all 42 lines...
01-- Global leaderboard script
02local ds1 = game:GetService('DataStoreService'):GetOrderedDataStore("TopSurvivals")
03 
04 
05while true do
06    local Ascending = false
07    local PageSize = 4
08    local pages = ds1:GetSortedAsync(Ascending, PageSize)
09    local CurrentPage = pages:GetCurrentPage()
10 
11    for i,v in pairs(script.Parent:GetChildren()) do
12 
13        if v.Name ~= "Label" and v ~= script then
14 
15            v.Visible = false
View all 32 lines...
0
Firstly, in the first script you don't even need ordereddatastore, and this is important because ordered requests take a considerably longer time. Second, what specifically is going wrong? What is your output? I don't really want to decipher your whole code without explanation msuperson24 69 — 5y
0
never mind i have it fixed SupaTheNoobCatcher 12 — 5y

Answer this question