This is usually just you not serializing something, Lua tables can sometimes not transform into JSON for some reasons.
JSON only supports dictionaries which only have string as the key, so no other types of keys, it also supports arrays, and the definition of array here is any table that only has indexes from 1-n, no gaps, and no other string keys inside that same array.
JSON also only supports as values: booleans, numbers, strings, and other tables which follow the same rules.
So, things like Color3s, Vector3s, CFrames, and many others need to handled manually by you.
Im only editing the inside of profile.Data but does it still apply? I also don’t connect :Release() to :BindToClose, only to .PlayerRemoving but maybe it also applies.
I fixed it, this is actually what happened: so for profile.Data, I add a DataChanged signal and a _state table that stores the original table. And then, for every table inside profile.Data, I add a KeyChanged signal which caused _state to have a KeyChanged signal when it’s not supposed to, and there is a table inside _state which keeps on repeating that which probably causes the error.
I encountered two errors whilst using your ProfileService for more information see the topic here: [ERROR] ProfileService. Please let me know if there’s a solution. Thank you!
My game uses a bit of an odd shutdown system- on BindToClose, players are teleported to a “holdover” server before being teleported back to the main game. This lets us do fairly seamless updates for our players.
How will this interfere with ProfileService’s attempts to save player data on BindToClose? What would be the proper way to handle something like this? Perhaps a grace period of ~20 seconds before teleporting the players to the holdover server?
What you should do teleport on them on the player’s profile’s :ListenToServerHop, and while not everyone has been teleported, yield your :BindToClose call.
DataStore requests in-game take around 0.2 - 0.7 seconds, given everything is being handled in a coroutine, I believe so, yes.
I haven’t tested that, but I would guess it’s fine.
It’s either don’t handle that properly or have a higher risk of someone not being teleported fast enough. Being teleported back isn’t much of a priority afaik?