Ok, here is my script:
1 | game.Players.PlayerAdded:Connect( function (plr) |
2 | local money = Instance.new(“IntValue”, plr) |
3 | money.Parent = plr |
4 | end ) |
Okay here is the fix:
1 | game.Players.PlayerAdded:Connect( function (plr) |
2 | -- You forgot the leaderstats folder, the money val, and the name |
3 | local leaderstats = Instance.new( "Folder" ,plr) |
4 | local money = Instance.new(“IntValue”) |
5 | money.Parent = leaderstats |
6 | money.Name = "money" |
7 | money.Value = 0 |
8 | end ) |
Hope it helps!
You need a folder called "leaderstats".
Here is an example:
01 | game.Players.PlayerAdded:Connect( function (plr) |
02 | local leaderstats = Instance.new( "Folder" ) |
03 | leaderstats.Name = "leaderstats" |
04 | leaderstats.Parent = plr |
05 |
06 | local money = Instance.new( "IntValue" ) |
07 | money.Name = "Money" -- You can change this |
08 | money.Parent = leaderstats |
09 | money.Value = 30 -- You can change this |
10 | end ) |
Remember, if this answer helped, please upvote and accept, it helps! :)