1 | game.Players.PlayerAdded:connect( function (player) |
2 | local leaderstats = Instance.new( "leaderstat" ,player) |
3 | leaderstats.Name = "leaderstats" |
4 |
5 | local points = Instance.new( 'IntValue' ,leaderstats) |
6 | points.Name = "Points" --Name of stat |
7 | points.Value = "0" |
8 |
9 | end ) |
There :)
01 | --Made by GuardainDev |
02 | function Entered(player) |
03 | wait() |
04 |
05 | if player:findFirstChild( "leaderstats" ) ~ = nil then |
06 | player.leaderstats:remove() |
07 | end |
08 |
09 | stats = Instance.new( "IntValue" ) |
10 | stats.Parent = player |
11 | stats.Name = "leaderstats" |
12 |
13 | money = Instance.new( "IntValue" ) |
14 | money.Parent = stats |
15 | money.Name = "Points" |
Try making leaderstats and points not local. Also, slightly change your code to this:
01 | --Make sure your script is a local script |
02 | Player = game.Player.LocalPlayer |
03 | game.Players.PlayerAdded:connect( function (player) |
04 | leaderstats = Instance.new( "leaderstat" ,Player) --Player now has a variable set, so that should work |
05 | leaderstats.Name = "leaderstats" |
06 |
07 | points = Instance.new( 'IntValue' ,leaderstats) |
08 | points.Name = "Points" --Name of stat |
09 | points.Value = "0" |
10 |
11 | end ) |
If it doesn't work let me know. I'm no leaderstats expert after all.