So today I made a data saving script so I can, ya know, save data. Whenever I change the amount of cash I have in console to some number, let's say 50, it saves whenever I leave. However whenever I gain money through a button and then leave, it doesn't save. I have no clue why it does this, and in every tutorial I've seen this doesn't happen.
COMMUNITY QUESTION
My money saves through console but not through a button, how do I fix?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Button code local debounce = false script.Parent.MouseButton1Click:Connect(function() if debounce == false then game.Players.LocalPlayer.Character.Humanoid.Health = 0 game.Players.LocalPlayer.leaderstats.Cash.Value = game.Players.LocalPlayer.leaderstats.Cash.Value + 1 debounce = true wait(3) debounce = false end end)