Best way to set up temporary data for players?

Is there a good way to set up temporary data for players? I looked into DataStore to set up temporary data, but I don’t think it’s the best way (because of too many SetAsync and GetAsync calls).

Are there Data Structures in Roblox that can do something like the following?:

{Player0, temp_gold, temp_wood}
{Player1, temp_gold, temp_wood}
{Player2, temp_gold, temp_wood}

And if I wanted to, I could get a player’s gold by calling something like:
data.structure:Get(Player1.temp_gold);

1 Like

Temporary data is simple, you basically need a table which adds a new key per player joined. This key leads to another table, which is the default temp data.

3 Likes

Oof. I should’ve thought of that. Thank you @Operatik!

3 Likes