Super useful! Been an avid user of ProfileService for years but all my future work will be ProfileStore, thanks for this!
oh my god 4 months later I got it, I got so annoyed for 3 months I gave up on this and did the map instead
the issue was that I sent the player as a string and not a instance - it had nothing to do with the database, but I accidently commented GetPlayerFromCharacter. I feel so dumb oh my god.
I’m encountering an issue where ProfileStore:StartSessionAsync
often freezes indefinitely between two checkpoints in my code. It never reaches checkpoint2
, and there are no errors or warnings in the output. Here’s the snippet:
print("checkpoint1")
-- ProfileService session start
local profile = ProfileStore:StartSessionAsync("Player_" .. player.UserId, {
Cancel = function()
return player.Parent ~= Players
end
})
print("checkpoint2")
If I change it to the following code, it works and checkpoint2
is reached:
local profile = ProfileStore:StartSessionAsync("Player_" .. player.UserId, {
Steal = true
})
However, I am scared that using Steal = true
could lead to data loss if the session is already active in another server. E.g:
- What happens if the existing session was still saving or processing data already?
- Will forcing the session lock discard the in-progress changes?
Question: Is using Steal = true
safe in this context, or could it lead to data loss if another server is holding the session lock and overall?
Looking forward to any advice
Are you getting infinite yielding while in Team Test? If so it’s because MessagingService:SubscribeAsync() yields indefinitely for no reason particularly in team test - this can be prevented by putting the store in mock mode in team test.
So it first started in solo play tests and, yes, occasionally in TeamCreate, the messagingservice warning was present. But then I noticed it also happened on live servers, so some scripts couldn’t find leaderstats for the first players, which broke the server functionality.
As ive said, i replaced it with the Cancel
function, which resolved the issue, and leaderstats are saving and loading fine now. However, like ive said: im afraid that the Cancel
function could lead to potential data loss in the future. Should I worry or will it be fine in this case?
By the way, thank you so much for creating this system! It’s incredibly helpful for indie developers like me who can’t afford expensive DataStore solutions. I truly appreciate your work
My only other recommendation is to make sure you’re releasing your profiles when players leave.
The Steal argument is documented in the wiki - if anyone decides to use it there will be no support provided as it’s not intended for production use.
I recommend fully reading the first post aka topic as it explains what is different from ProfileService and ProfileStore.
Check out a ProfileStore YouTube tutorial by @Rileybytes :
ProfileStore overview, leaderstats and data interface (click here)
Thank you @Rileybytes for your contribution!
Is there a delete equivalent for Reconcile? As in, if one of the default values gets deleted or modified, will it update for existing profiles?
Is there a method to return everyone’s data-- something that can be used to make a list, sorta like the “DataStore Editor” plugin?
How to replicate player data to client using replica after reseting player data using replica.Data = {}?
There’s a way but only for people in the current server, if you’re trying to make global leaderboards this is not made for that
Another ProfileStore tutorial by @Rileybytes has been released:
Secure Developer Product handling with ProfileStore (click here)
Thanks so much to @Rileybytes for the ProfileStore tutorials!
Question mate, how do you handle the automatic benefits of gamepasses without the need to rejoin?
Give the benefit first on the product callback and then have a characteradded where you check with ProfileStore if they have it to grant the benefit again on respawn
Not sure if you mean something else though
how do i teleport the Data to a subplace?
Few questions
If I have two game instances (like a universe), the first one is where character-creation (players customising character) and second is the actual game.
- For the scenario above, using profilestore, if I want to add a new data-value (e.g. new currency like diamond) can I just populate the data-template that’s in the first game instance (character creation place) or must I have the data-template in both game instances/places and keep editing both whenever adding new data values?
Asking because, it’d be a lot convenient if I have the template in one place, add a new data, and even if player teleports to the 2nd game instance (where I load profilestore as well) for the datastore to detect the newly created data values that was loaded in the 1st game instance, rather than having to manage multiple game instances and having to put the new data currency in each of them.
Amazing module, it is insanely easy to implement cross-server communication like gifting, and saving player statistics that would be updated right after/before the player leaves (GlobalUpdates usage), which are issues I ran into with ProfileService that led to me altering the code within the module. But with ProfileStore, I did not run into any issues at all. It is also very easy to move from ProfileService to ProfileStore. I heavily recommend using this module, especially when you’re currently using ProfileService! And to end this, the type auto-completion is a godsend.
Thank you loleris!
Does this support dictionary save? Because i have a template that look like this:
local template = {
PlayerStats = {
Cash = 0,
PizzaDelivered = 0,
SellMultiplier = 1,
},
TutorialProgress = {
Arc = 1,
Step = 1,
Complete = false,
},
}
return template
So can i just use 1 profile or i’ll need to use multiple profile for each small table in this template?
(I don’t even know how to explaint this
, i got no brain cells left lol)
I’ve been using this datastore module and very helpfully. Thank you