print("Cash Leaderboard Loaded")
function onPlayerEntered(newPlayer)
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
local cash = Instance.new("IntValue")
cash.Name = "Money" --name of currency (e.g. cash, money, resources, bucks, etc.)
cash.Value = 1000 --starting money.
cash.Parent = stats
stats.Parent = newPlayer
end
game.Players.ChildAdded:connect(onPlayerEntered)
end
end
game.Players.PlayerAdded:connect(function(p)
local stats = Instance.new("IntValue", p)
stats.Name = "leaderstats"
local money = Instance.new("IntValue", stats)
money.Name = "Cash"
money.Value = 100
while true do
wait(5)
money.Value = money.Value + 10
end
end)
It won't give me money nor I can't see it on the leaderboard. Please help.

1 comment
thanks