I am new to DataStore, I've read the wiki and a few example script's but I am not sure if I am using DataStore right, can someone tell me if I am and if I'm not can you tell me what I am doing wrong about it?
wait(1)
local player = game.Players.LocalPlayer
local stats = player:WaitForChild("leaderstats")
local cash = stats:WaitForChild("Cash")
local service = game:GetService("DataStoreService"):GetDataStore("GameValues")
cash.Changed:connect(function()
service:SetAsync("Cash",cash.Value)
print("Updated cash to "..cash.Value)
end)

4 comments
No, no you aren't. You're Welcome.
.Thanks..I guess?
Btw can I buy one of the cows your selling?
No..