I'm making a game that has a leaderboard system. This is inserted inside the leaderboard part that goes into the player.
The script is trying to check if the cash is being changed. Even when it does change, nothing happens. What am I doing wrong?
The code:
local DSS = game:GetService("DataStoreService") local Money = DSS:GetDataStore("ThisGameCashBlaBsshdaklsdjsalkd") local CashValue = script.Parent.Cheeses game.Players.PlayerAdded:connect(function(p) local pCash = Money:GetAsync(p.UserId) or 0 CashValue.Value = pCash CashValue.Changed:Connect(function(v) Money:SetAsync(p.UserId,v) print("saving cash data") end) end)