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.