Here is the code I have:
01 | game.Players.PlayerAdded:Connect( function (player) |
02 | local leaderstats = Instance.new( "Folder" ) |
03 | leaderstats.Name = "leaderstats" |
04 | leaderstats.Parent = player |
05 |
06 | local Searches = Instance.new( "IntValue" ) |
07 | Searches.Name = "Searches" |
08 | Searches.Value = 0 |
09 | Searches.Parent = leaderstats |
10 |
11 | local Cash = Instance.new( "IntValue" ) |
12 | Cash.Name = "Cash" |
13 | Cash.Value = 0 |
14 | Cash.Parent = leaderstats |
15 | end ) |
all the tutorials i've watched don't work, please help
i think this should be ok but the script's parent have to be ServerScriptService
01 | game.Players.PlayerAdded:Connect( function (player) |
02 |
03 | playersLeft = playersLeft + 1 |
04 |
05 | local leaderstats = Instance.new( "Folder" ) |
06 | leaderstats.Name = "leaderstats" |
07 | leaderstats.Parent = player |
08 |
09 | local Searches = Instance.new( "IntValue" ) |
10 | Searches.Name = "Searches" |
11 | Searches.Value = 0 |
12 | Searches.Parent = leaderstats |
13 |
14 | local Cash = Instance.new( "IntValue" ) |
15 | Cash.Name = "Cash" |
16 | Cash.Value = 0 |
17 | Cash.Parent = leaderstats |
18 | end ) |