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

Adding Datatore Service To My Script?

Asked by 3 years ago

Hey devs I wanted To Add A Datstore Service To My Daily Reward Script! Script is...

local Chest = game.Workspace.Chest

local Chest2 = game.Workspace.CHEST2

local Lower = Chest2.NameTag.Lowertext

local debounce = false

local dailyreward = 250

Lower.Text = dailyreward

game.Players.PlayerAdded:Connect(function(plr)
    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = plr

    local cash = Instance.new("IntValue")
    cash.Name = "Gold"
    cash.Value = 50
    cash.Parent = leaderstats

    Chest.Touched:Connect(function()
        if not debounce then
            debounce = true
            cash.Value = cash.Value + dailyreward
            for v = 60, 0, -1 do
                for b = 60, 0, -1 do
                    Lower.Text = "Come Back In "..v.." Minutes, "..b.." Seconds!"
                    wait(1)
                end
            end
            debounce = false
            Lower.Text = dailyreward
        end
    end)
end)
0
Its Actually Hourly Reward not A Daily Reward XD kidsteve923 139 — 3y
0
This is not a request site. Please make an attempt to do this before requesting on this site IAmNotTheReal_MePipe 418 — 3y
0
there isn't any datastore code in the script? OfficerBrah 494 — 3y

2 answers

Log in to vote
0
Answered by 3 years ago

Please take a look at this article and make an attempt at implementing data stores into your script.

If you are still having issues, please post your updated script with your attempt.

0
idk how to make data store plus i am a noob at coding :/ kidsteve923 139 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

https://developer.roblox.com/en-us/api-reference/class/DataStoreService https://developer.roblox.com/en-us/articles/Data-store

0
idk how to make data store plus i am a noob at coding :/ kidsteve923 139 — 3y

Answer this question