Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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)

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.