local currencyName = "Cash"
game.Players.PlayerAdded:Connect(function(player)
local folder = Instance.new("Folder")
folder.Name = ("leaderstats")
folder.Parent = player
local currency = Instance.new("IntValue")
currency.Name = currencyName
currency.Parent = folder
local currency = Instance.new("IntValue")
currency.Name = ("Potatoes")
currency.Parent = folder
end)
COMMUNITY QUESTION
attempt to index nil leaderstats?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
local currencyName = "Cash" 02 03 game.Players.PlayerAdded:Connect(function(player) 04 05 local folder = Instance.new("Folder") 06 folder.Name = ("leaderstats") 07 folder.Parent = player 08 09 local currency = Instance.new("IntValue") 10 currency.Name = currencyName 11 currency.Parent = folder 12 13 local currency = Instance.new("IntValue") 14 currency.Name
This is barely any information for us to use. Please show us the adding/subtracting code.