hello, I have just started coding on roblox and i want to make a simple clicker/simulator game. why does this code not work for a leaderboard?
game.Players.PlayersAdded:Connect(function(player) local stats = Instance.new("Folder") stats.Name = "leaderstats" stats.Parent = player
local power = Instance.new("IntValue")
power.Name = "Power"
power.Value = 0
power.Parent = stats
local cash = Instance.new("IntValue")
cash.Name = "Power"
cash.Value = 0
cash.Parent = stats
end)

1 comment
It should be a ServerScript inside of ServerScriptService