I want to make a leaderboard for time played in my server, i have take the model of this script but he doesn't save the leaderboard stats.. you have a script for time playing with save ?
sorry for my bad english :(
function onPlayerEntered(Player) local stats = Instance.new("IntValue") stats.Name = "leaderstats" local mins = Instance.new("IntValue") mins.Name = "Time Played" mins.Value = 0 mins.Parent = stats stats.Parent = Player while true do mins.Value = mins.Value + 1 wait(60) end end game.Players.ChildAdded:connect(onPlayerEntered)
OR
for time played in seconds
function onPlayerEntered(Player) local stats = Instance.new("IntValue") stats.Name = "leaderstats" local secs = Instance.new("IntValue") secs.Name = "Time Played" secs.Value = 0 secs.Parent = stats stats.Parent = Player while true do secs.Value = secs.Value + 1 wait(1) end end game.Players.ChildAdded:connect(onPlayerEntered)
Thanks but is not work :/ i don't see my leaderboard, i have put this script in serverscriptservice but don't working..
Closed as Not Constructive by User#19524
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?