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

How do i make a leaderboard ?

Asked by 6 years ago

I was looking at Wiki for a leader board and i tried it but it does not work. So i looked youtube and there was several tutorials but there was not one that worked so I am really stuck since i am trying to make a leaderboard for a game that one my boss told me to make in roblox.

0
What do you mean exactly? A custom leaderboard? or just a normal leaderboard BlizzardBan 15 — 6y

1 answer

Log in to vote
0
Answered by
noammao 294 Moderation Voter
6 years ago

This is an example. Put this script inside of ServerScriptService.

game.Players.PlayerAdded:connect(function(player) -- runs code everytime someone joins. local leaderstats = Instance.new("Model") -- creates Leaderboard leaderstats.Name = "leaderstats" -- Changes it's name from Model to leaderboard leaderstats.Parent = player -- parent of model

 local money = Instance.new("IntValue") --We create a new IntValue
 money.Name = "Money" --this is the name you want the leader-stat to be when it shows up in-game.
 money.Value = 0 --this is the value of money the new player starts out with.
 money.Parent = leaderstats -- Set the money object as a child of the leaderstats object.

end)

0
oh ok. seems like it didn't show all of the code as an actual roblox code. xd noammao 294 — 6y
Ad

Answer this question