What a DataStore does
A DataStore is Roblox’s cloud storage for your game: player progress, currencies, inventories — everything that should survive a server hop. The basic loop: load the player’s data when they join (with a default table for new players), track changes while they play, and save when they leave or periodically (auto-save every few minutes protects against crashes).
The mistakes that lose data
The classics: saving in the middle of rapid changes (partial data), not handling the retry when the store call fails (network hiccups are normal), and — the worst one — multiple servers writing the same player’s data at once (session hopping duplication). The community-standard fix for the last is session locking: mark data as "in use" and refuse conflicting writes.
Versioning and testing
Test with Studio’s API access enabled, keep a backup key version of your data schema, and never ship a schema change without a migration path for existing players. Roblox provides version history on DataStores — being able to roll a player back after a corruption bug is the difference between an apology and a riot.