simple little script but all it does is put out how much money i currently have. so if it add 15 to 10 lets say, its says i added 25, when i only added 15...
local rs = game:GetService("ReplicatedStorage")
local animation = rs:WaitForChild("moneyAnimation")
game.Players.PlayerAdded:Connect(function(plr)
local money = rs:WaitForChild("LockedBanks"):WaitForChild(plr.Name)
while wait() do
local pastMoney = money.Value
money.Changed:Connect(function(newMoney)
if newMoney > pastMoney then
animation:FireClient(plr, newMoney - pastMoney)
wait(2)
end
end)
end
end)

4 comments
i tried that but it does the same thing because the starting value was 0. Thats why i added the loop so itll get the most recent value before the change
Use the argument passed which is the new value ;~;
Try waiting a few seconds before the pastMoney value is set to change the initial value
thank you