Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i make this leaderstats script autosaving?

Asked by 3 years ago
Edited 3 years ago

I need to make this script to autosave but I dont know how, here is the script:

game.Players.PlayerAdded:Connect(function(plr)
    local stats = Instance.new("BoolValue",plr)
    stats.Name = "leaderstats"

    local cash = Instance.new("IntValue",stats)
    cash.Name = "Coins"
    cash.Value = 0

    local cash = Instance.new("IntValue",stats)
    cash.Name = "Gems"
    cash.Value = 500

Answer this question