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

How do you add a leaderboard that automatically detects KO's and WO's?

Asked by 10 years ago

I am making a game that will record your kills and deaths, please help me in making a script for making a leaderboard.

2 answers

Log in to vote
0
Answered by 10 years ago

The current ROBLOX leaderboard will detect KOs and WOs automatically by default.

Here's some code to help you:

Game.Players.PlayerAdded:connect(function(player)
Instance.new("IntValue",player).Name='leaderstats'
Instance.new("IntValue,player.leaderstats).Name='KOs'
Instance.new("IntValue,player.leaderstats).Name='WOs'
end)
Ad
Log in to vote
0
Answered by
cuff5 10
9 years ago

The first answer is actually very buggy and incorrect. Here is how you actually give the values:

game.Players.PlayerAdded:connect(function(player)
    L = Instance.new("IntValue",player)
    L.Name = "Leaderstats"
    K = Instance.new("IntValue",player.leaderstats)
    K.Name = "KOs"
end)

Answer this question