Datastore in one server

So I want to make a datastore basically if a player plays my game and gets 100 coins and rejoins the same server he would have his data but if he goes into another server he wouldn’t have those coins!

You can save the JobId of the server along with the amount of coins the player has on that server in a DataStore. DataModel | Roblox Creator Documentation

Keep in mind that whenever that server closes, the same JobId will never be used again. The coins of the player will be lost.

You could insert a folder to save the coin values when a player leaves via a script, then when a player joins it checks the coin value folder to see if their data is there.

1 Like

This would be the simpler solution. If you wish to discard the data whenever the server is stopped.

Saving in a DataStore would allow you to keep their data after that server is stopped.

Yes, but isn’t the goal to erase their data in a different server or when the server is stopped?

Yes, I think so.
That is why I think your solution is better.

Technically, they both will work, however the method the method I listed does not use datastores (cause those can be confusing) is more of the starting option

1 Like

I’m curious, what would be the purpose of this? Like is there a practical application or is it just a messing around with what’s possible thing?

Basically you know the rake?, I’m curious how @RVVZ made the coins save in one server