Hey, I am creating an obby but I have this problem: I want the stage leaderboard and the minute leaderboard In the top right of the screen. The problem is, when I put the minutes leaderboard in Serverscript service, I only have the stage leaderboard who is showing but not the minutes leaderboard and the leaderboard dont update, there a video the to understand my problem: https://streamable.com/jux3pk and theres the two scripts: -the stage leaderboard:
local checkpoints = workspace:WaitForChild("Checkpoints droite")
local remoteEvent = game.ReplicatedStorage:WaitForChild("ResetStatEvent")
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local stage = Instance.new("IntValue")
stage.Name = "Stage"
stage.Value = 0
stage.Parent = leaderstats
player.CharacterAdded:Connect(function(char)
local hum = char:WaitForChild("Humanoid")
wait()
char:MoveTo(checkpoints[stage.Value].Position)
hum.Touched:Connect(function(hit)
if hit.Parent == checkpoints then
if tonumber(hit.Name) == stage.Value + 1 then
stage.Value = stage.Value + 1
end
end
end)
end)
end)
remoteEvent.OnServerEvent:Connect(function(plr)
if plr and plr.Character and plr.Character:FindFirstChild("Humanoid") then
local humanoid = plr.Character.Humanoid
plr.leaderstats.Stage.Value = 0
humanoid.Health = 0
end
end)
and the minutes leaderboard:
local DataStoreService = game:GetService("DataStoreService")
local DataStore = DataStoreService:GetDataStore("TimeStats")
game.Players.PlayerAdded:Connect(function(Player)
local Leaderstats = Instance.new("Folder")
Leaderstats.Name = "leaderstats"
Leaderstats.Parent = Player
local Minutes = Instance.new("IntValue")
Minutes.Name = "Minutes"
Minutes.Value = 0
Minutes.Parent = Leaderstats
local Data = DataStore:GetAsync(Player.UserId)
if Data then
Minutes.Value = Data
end
coroutine.resume(coroutine.create(function()
while true do
wait(60)
Minutes.Value = Minutes.Value + 1
end
end))
end)
game.Players.PlayerRemoving:Connect(function(Player)
DataStore:SetAsync(Player.UserId, Player.leaderstats.Minutes.Value)
end)
Thanks in advance!

3 comments
Hi! Thanks a lot! I just have a small problem, I showed the wrong script for the leaderboard stage, here is the correct one: https://pastebin.com/8f4TB884 Thanks in advance!
I've updated the script. It should handle both minutes and stage loading and saving.
Hey! Thannks you for your answer, I have now an error in outpout: Stage is not a valid member of Folder "Players.wDaerkfeX.leaderstats" Thank you in advance!