Save your player data with ProfileService! (DataStore Module)

Hey, is there any way I can get the latest version of a data if updated in another instance server?

I have a racing game, all my tracks are under one game in different places. How do I make the data carry over all the places and affect eachother!?

e.g. (In the main game I have 100 dollars, I then make 50 more, so I have 150 dollars in all servers?)

Also how would i go about displaying this on a TextLabel?

Many Thanks

I’m not very sure what you’re asking but due to session locking, another server can’t edit data that has a session lock on it. If the player is in one place inside the experience and then teleports to another place, I’m pretty sure the new place that the player is in would be able to access the players data because the session lock was released and now that place can put a session lock on the players data.

I’m not 100% sure about what you are asking so sorry if I did not answer your question.

For the second question of how to display the players data on a TextLabel, after the players data has been loaded and put into the Profiles table, you can then access the players data from inside the Profiles table and then display that data on a TextLabel.
image

Would it be just using that and then .Cash or whatever I want to display? Thanks.

This is what im aiming for!!!

My games structure is attached
DevFormumHelp
below

The image below should hopefully help explain about the multi server!

Sorry for the terrible wording in my first post!

im sure this has been asked somewhere but I couldn’t find anything directly relating to my problem so decided to ask here!

how would I seamlessly make data load between servers, for example if I were to be in one server and said server shutdown, joining a new server may take upward 5 minutes to actually load my data. same occurs if you hop servers too frequently. any way to blend data loading and session locking, without compromising anything like security

Personally haven’t noticed long loading times when using ‘shutdown all’ for updates. I think ProfileService automatically releases the data on server close. Might be an issue for unintended server crashes (out of memory).

Is your example hypothetical, or did you actually notice it in practice?

whenever i shutdown servers for updates (i use a soft shutdown type system) it sometimes could take an entire server up to 3 minutes to load anyones data

I’m having a issue where it only saves in studio but not in the actual game :frowning:
I have access API services on

I am not sure if I am remembering this correctly, but is it advised to call :Save() each time a developer product is purchased?

I just have a vague memory of reading that somewhere but I can’t seem to find evidence of it even in the documentation.

How would I go about saving the values inside of a folder? I used this video as a tutorial, and I have no clue on what to do for saving everything inside of a folder… Please help!

Why do you need to save the values inside of a folder? Just access the values from the Profiles table.

I don’t remember seeing this in any documentation but its a good idea to do this if you aren’t already, just a bit of a failsafe so nobody wastes anything!

1 Like

I plan to make a index with different characters that you can see from the ones you have obtained, and I wanted to add values to a folder to check if the player has owned that character before.

I’ve recently started using this module, and I’m not exactly sure what metatags are or how I should use them. If anybody could provide some guidance here that would be great.

Would this be wise to do so? Just in case it could be throttling the datastore a bit in the case that someone purchases a dev product multiple times in quick succession.

What use cases even are there to call :Save() anyways, thanks!

Any help with this?? I still have no clue how to do this!

It’s a safe Method - calling it too many times won’t risk anything! But, it’s also… Redundant since very early updates to ProfileService - It might only speed up the saving a little bit and is not necessary for protecting state - Why would ProfileService need some explicit method to save when it can just reliably do this all the time :sweat_smile:? It was a method created in early development stages and later had it’s behaviour changed to only request a faster save. To make secure dev product sales you need to cache receipt id’s - there’s an example on how to do this here: Developer Products - ProfileService

3 Likes
  1. I keep getting kicked in studio (PlayerAdded function is responsible)
  2. I already use regular datastore and assigned many values already. How would I be able to switch quickly?

My apologies, I was just misdirected because I thought I remembered seeing something about calling :Save() whenever something is bought, but thank you for clarifying!

So is there no real use case for this given the most updated version of profile service? Since you mentioned it being used during early development. I understand that its to request faster saving, but is there really any situation where you would need to do this?

Also, sorry to ask so many questions, but the documentation regarding developer products, what potential issues would there be if you didn’t handle developer products as shown in the documentation?

Can you possibly guide in a direction on how to create multiple save slots?

1 Like