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) ~~~~~~~~~~~~~~~~~
Should work, tested it this time :d.
1 | game.Players.PlayerAdded:connect( function (player) |
2 | local Stats = Instance.new( "Model" ,player) |
3 | Stats.Name = "leaderstats" |
4 | local SPoints = Instance.new( "IntValue" ,Stats) |
5 | SPoints.Name = "Points" |
6 | end ) |
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
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
1 | Stats = Instance.new ( "IntValue" ) |
2 | Stats.Parent = player |