Hello, since some time my game has gained in popularity and regularly servers are shut down for no reason, which causes problems with player data.
Let me explain, players have to find some “part” in my game, when they find a part, a boolvalue appears with the same name of the part in a file that is in the player, these values are saved with a script.
When a server is shutdown for no reason, players see their boolvalue doubled or tripled, so if they find an object “X” on the map, then when the server shutdown for no reason this object “X” is duplicated, then saved, and when the player joins another server his data is completely broken.
I’m looking for a way to know how I could detect the duplicated names in order to destroy the ones that are too many and have only one per object (the player joins and has three boolvalue named “Monster1”, I’d like the script to destroy two of them, and keep one so that his data is back to normal. Can someone help me. Sorry if the text is too long and if I added unnecessary details. Thanks for your help
Hello, thank you for your answer I have already tried to transfer my script to a script adapted for the profileService module, without success, I have difficulty in writing this kind of script quite complex I am still a beginner. Is there any other way for me to counter this problem please?
depends on how the data is being handled, most of the time this is some issue in the script,
a single variable out of place or
some complex system (that you don’t know 100% if it will work without bugs)
can ruin the whole datastore stuff, doens’t matter if you switch save styles, the problem will persist if you do not fix the way ‘’ users obtain X item ‘’ or something, even with profile service, sometimes you are duping items without knowing it