Oh well looks like it worked the whole time. My bad thank you tho for telling me what reconcile does! I didn’t know it before
how to switch it from profileservice to profilestore since it says it backwards compatible. the store name and values seems to be correct but it doesnt work is there anything else i need to change?
Is there a way to get sorted data for leaderboards like OrderDataStores, or do I have to save that seperately?
Is there a bug with profilestore and team test? I tried running a project via studio and via roblox as a published game and it works fine. But via team test it seems to get stuck.
I debugged a little and it stops at messagingService
You have to save the data separately, probably when the player leaves, before ending the session get the data of player and have a error handler.
The functions in profilestore are different than profileservice but if you do everything right, you just have to load the same key you loaded in profileservice and it should work.
fixed my annoying issue where it sometimes wouldnt save
Nice find! It seems like MessagingService:SubscribeAsync()
has inconsistent behaviour between local testing and team testing - it doesn’t halt on local testing, but halts indefinitely on team testing. ProfileStore can still work with no MessagingService calls, but sadly at the moment it doesn’t seem like there’s a way to distinguish whether a server is being ran on team test so MessagingService calls could automatically not be called.
I’ve filed a studio bug report:
Update! I’ve been using ProfileStore for a few weeks now in production and have run into zero issues regarding player data. We manage a LOT of players, so I was very worried that something would go wrong (I was warned though), but surprisingly everything went great. I am a massive fan of the API changes from ProfileService → ProfileStore, I think that they are far more intuitive and the docs have been incredibly helpful at explaining what things do. I feel as though things are faster, especially for rejoins. Is that a placebo? I have no clue!
I’ve also managed to implement some awesome tools for my game, such as this data visualizer that can go back in time and revert data (all uses ProfileStore!)
All in all, great changes, very happy. 5 stars!
I’ve been using ProfileStore and Replica for a few days now and have run into zero issues currently. It’s really a successor to both, especially with the new session locking feature.
Job well done!!
i have the correct profilestore functions. do i just need to put that line of code or smthn? and where.
Use the same key you previously used in ProfileService for loading player data in ProfileStore.
In ProfileService i used PSPRODUCTION:LoadProfileAsync("Player_"..player.UserId)
so thereforce i have to use PSPRODUCTION:StartSessionAsync("Player_"..player.UserId)
in ProfileStore.
For me i use the following:
local psplr = PSPRODUCTION:StartSessionAsync(`Player_{plr.UserId}`, {
Cancel = function()
return plr.Parent ~= plrs
end,
})
Why did you delete “Scope” from this module?
I was using Scope in my games.
Do the events OnLastSave and OnSave guarantee changes to Profile.Data can be made in the function passed?
Is There any alternative to this that can handle leaderboards?
I have set up an project using the basic usage tutorial. I am pretty new and I do not know if this is the right place to ask, but how would I go about accessing and changing the profile data from another script file? And is it even possible
Hey! New to ProfileStore and ProfileService here… how would I process right to erasure requests with ProfileStore?
I’ve recently run into an issue involving my codebase and ProfileStore where if a server is shutting down, data will not fully save. I believe this is due to the BindToClose taking precedent from ProfileStore, and the fact that I yield to apply new data changes on server close. Is there any sort of events for saving that do allow me to yield? The only way around this that I think I can do is to comment out the BindToClose in ProfileStore and rely on my current system for PlayerRemoving.
I’m unsure if I experienced this with ProfileService, I don’t think I did, but maybe I did and just haven’t realized until now.
For ProfileStore:
- Require the module
- Get the datastore via ProfileStore.New
- Use RemoveAsync with the Player Key (how you store player data within the datastore)
This is how i do it, via a Module script parented inside ProfileStore (Obviously you would have to change some stuff in this code):
--// Module
local module = {}
--// ProfileStore
local ProfileStore = require(script.Parent).New("ProductionMainData",{})
--// Functions
function module:WipeData(userid: number)
ProfileStore:RemoveAsync("Player_"..userid)
print("Succesfully erased player data!")
return true
end
return module
Example Usage:
require(game.ServerScriptService.ProfileStore.WipeData):WipeData(684075566)