So i got a currency in my game that is called StarCoins and i save it with data storage. When i go and pick up a normal "Roblox Coin" i get 100 StarCoins and that value will be saved in the data storage and the same if i have the "Roblox Coin" but instead i have changed so it will take 100 StarCoins if i touch it so - 100 and that will also be changed if i leave the game and so on. The StarCoins value that is showing on my Custom Gui and also in players.leaderstats.starcoins.value are saved correctly when i use the Coins.

But for some reason when i use my store which is connected to parts ingame with surfaceGui.button it dont work... in play mode in the studio it removes the correct amount of what the items cost but when i leave the game then - value do not save...

First example - I press play on roblox studio gets in the game with 0 StarCoins, then i pick up 3 Roblox Coins and i will get the value of 300 StarCoins as every Roblox Coins gives me 100 StarCoins. When i then press "Stop" and leaves the roblox studio game this value will change cuz if press play again and check i will have 300 StarCoins.

Second example - I press play on roblox studio gets in the game with 0 StarCoins, then i go and pick up 500 StarCoins and after that i go to my store and i interact with my buttons for an example i will buy an sword. The sword costs 200 StarCoins, after the purchase i lose 200 StarCoins and i get the Sword in my backpack. If i now leave the game from studio the data storage of the StarCoin value should be saved like in the first example but no. If i leave the game and the rejoin it i will have 500 StarCoins as i picked up 5 Roblox Coins that gave me this amount. But the 200 StarCoins i lost when i bought an item do not save...

Why is this happening? The DataStorage is saving everything else when i + or - the value of StarCoins but not with my Store.

Please Help, sorry for my ban english and bad explanation.