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

How do i add a leaderboard?

I have already asked this question and I am sorry, but it is not showing in Roblox Studio, is this a glitch with roblox studio?

game.Players.PlayersAdded:Connect(function(player)
	local stats=Instance.new("Folder")
	stats.Name="leaderstats"
	stats.Parent=player
	
	local power=Instance.new("IntValue")
	power.Name="Power"
	power.Value=0
	power.Parent=stats
	
	local cash=Instance.new("IntValue")
	cash.Name="Power"
	cash.Value=0
	cash.Parent=stats
end)

1 answer

Hello, kimbriel!

Your problem is easily fixable."stats" should be an IntValue rather than a Folder.

local stats = Instance.new("IntValue")

I hope this helps! :)

1 comment

0

Could you tell me what IntValue stands for?

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