I’m working on a simulator game to practice Lua and I noticed that while me and my friend were testing it, the leaderboards acted up. On the leaderboards I have two folders one named “Sugar” and another named “Cash.” The expectation was that the player on the top of the leaderboards would be the one with the most Cash. Is there any way I can change this.
game.Players.PlayerAdded:Connect(function(player)
local stats = Instance.new("Folder")
stats.Name = "leaderstats"
stats.Parent = player
local sugar = Instance.new("IntValue")
sugar.Name = "Sugar"
sugar.Value = 0
sugar.Parent = stats
local cash = Instance.new("IntValue")
cash.Name = "Cash"
cash.Value = 0
cash.Parent = stats
end)