attempt to index nil leaderstats? [closed]
Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.
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)
Closed as Non-Descriptive by Leamir
This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.
Why was this question closed?