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

How do I save money from a robbery to Data Stores?

Asked by 4 years ago

I want to make a game that has a short robbery and I've done that I just don't know how to save it to DataStores I have looked on countless youtube videos and they all have the same thing!! None of them actually says how to save it into the Data stores. It is soooo annoying!!! Here is the script:

game.Players.PlayerAdded:Connect(function(player) local ls = Instance.new("Folder",player) ls.Name = "leaderstats"

local money = Instance.new("IntValue",ls)
money.Name = "Money"



local cc = Instance.new("IntValue",player)
cc.Name = "CashCollected"

local robbing = Instance.new("BoolValue",player)
robbing.Name = "Robbing"
robbing.Value = false

player.CharacterAdded:Connect(function(char)
    player.Robbing.Value = false
    player.CashCollected.Value = 0
end)

end)

I'm sorry if only half the script shows up as a script.

0
Do you know how to use data stores, or should I include how in my answer? Nckripted 580 — 4y
0
Can you include the revised edit please. It keeps on saying "Error 403" winner2807 30 — 4y

Answer this question