I am having a problem with my money saving. I am using FE and the datastore works but my script that deducts money does not. When the user clicks it, it deducts the money but the money does not save when the user leaves the game. Why does it not save?
local Player = game.Players.LocalPlayer local PlayerStats = Player:WaitForChild('leaderstats'):WaitForChild('Money') script.Parent.MouseButton1Click:Connect(function() if PlayerStats.Value > script.Parent.Parent.Parent.Price.Value - 1 then PlayerStats.Value = PlayerStats.Value - script.Parent.Parent.Parent.Price.Value script.Parent.Parent.Parent.Enabled = false end end)