How to make a leaderstats the gives player cash every minute and saves data

I would like to know how to make a leaderstats the gives player cash every minute and saves data

3 Likes
1 Like

thats only the data store i already have a data store script i just want it to give players cash every minute

1 Like

What solutions have you tried so far?

Please do not ask people to write entire scripts for you.

local player
while wait(60) do
player.leaderstats.money.value += 10
end
2 Likes

so i should make another script in ServerScriptService

local cashAmountToGive = 10
while wait(60) do
    for i, player in pairs(game.Players:GetPlayers()) do
        player.Leaderstats.Cash.Value += cashAmountToGive 
    end
end

You could, but you can also spawn() it or utilize coroutines.