game.players.playerAdded:connect(function(plr) local stats =Instance.new("Folder"), plr) stats.name = "leaderstats"
local coins = Instance.new("IntValue"), stats) Coins.name = "Coins" Coins.value = 0
end)
game.players.playerAdded:connect(function(plr) local stats =Instance.new("Folder"), plr) stats.name = "leaderstats"
local coins = Instance.new("IntValue"), stats) Coins.name = "Coins" Coins.value = 0
end)
in LuaU coding, everything is case sensitive. It has to be Players, not players and it has to be PlayerAdded, not playerAdded. It's a bit annoying but you will get used to it.
so here is your script but fixed.
game.Players.PlayerAdded:Connect(function(plr)
local stats = Instance.new("Folder",plr)
stats.Name = "leaderstats"
local coins = Instance.new("IntValue",stats)
coins.Name = "Coins"
coins.Value = 0
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.