Data loss in my inventory script please help me?

Can someone help me? Lately I’ve been having a problem saving data from my inventory system, I’m already using datastore2 but the problem still persists, please someone help me to solve this.

  1. What do you want to achieve? Keep it simple and clear!
    I want my script to be saved correctly with minimal risk of data loss

  2. What is the issue? Include screenshots / videos if possible!
    I’ve been having a lot of reports of data loss lately there are always players buying tools

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I’ve tried many things but so far the problem persists

Script:
inventarios.lua (3.8 KB)

With problems like this normally I would provide a re-editted version of this script, but I do not speak that language.

So I will help verbally.

Common issues:

The 2 Datastores are not named differently.
The data is not constantly being saved.
The data is being saved but not replicated.

Please try pinpointing they exact issue so I can help you better.
A good way of doing this is by using print() to detect when something is printed to the output and finding out what isn’t printing to the output.

Please provide me with a re-edited script I’ve been trying to resolve this bug for months but I can’t I’m a complete newbie to the data store