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

How do you make a leader board?

Asked by 10 years ago

So I'm trying to make a leader board for a game I'm making, but I don't think I'm doing it right. Can someone tell me what's wrong? Here's the code: ~~~~~~~~~~~~~~~~~ game.Players.PlayerAdded:connect(function(player) local leaderstasts = Instance.new("IntValue", player) leaderstats.Name = 'leaderstats' local kos = Instance.new("IntValue", leaderstats) kos.Name = "KO's" kos.Value = 0 local wos = Instance.new("IntValue", leaderstats) wos.Name = "WO's" wos.Value = 0 end) ~~~~~~~~~~~~~~~~~

3 answers

Log in to vote
0
Answered by
yurhomi10 192
10 years ago

Should work, tested it this time :d.

game.Players.PlayerAdded:connect(function(player)
    local Stats = Instance.new("Model" ,player)
    Stats.Name = "leaderstats"
    local SPoints = Instance.new("IntValue",Stats)
    SPoints.Name = "Points"
end)

0
Unfortunately it didn't work. But thanks for trying! :D rockbot223 5 — 10y
0
Any errors? It should work, I tested it. yurhomi10 192 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

wait you know you can just go to toolbox models gamestuff and find the linked leaderboard click on it its inserted quit and save rejoin press f6 or f7 i forgot

Log in to vote
0
Answered by 10 years ago

The Stats Variable is supposed to be Instance.new ("IntValue",player)

If it doesn't work then try declare its parent after the instance is created like this

Stats = Instance.new ( "IntValue")
Stats.Parent = player

Answer this question