By some reason my game data store is saving the same data for all players, even this was not heppening before

The code:

Player 1 Data Before Leaving
image

Player 2 Data Before Leaving
image

Player 1 Data After Rejoining
image

Player 2 Data After Rejoining
image

(Note, Player 2 was the last one to leave the server)
(Note2, If the player has no ability nothing stays inside the folder)

(also i tested it with my alt and stuff and the last data that gets saved would be the data for each player by some reason)

2 Likes

SetAsync and GetAsync both expect a string to be passed in as the key. It looks like you’re passing in the player object itself. Could that be causing the issues?

2 Likes

It’s what @Uhsleep91 said, at the SavePlrData function

you should place at the PlrAbilityDataStore:SetAsync(PlayerRemoving, AbilitysToSave) a string, this can be done by adding a simple property: .UserId

so it would be:
PlrAbilityDataStore:SetAsync(PlayerRemoving.UserId, AbilitysToSave)

2 Likes

I tought that addind the .UserId did not work, tho i noticed i did not add that for the GetAsync, so if i had to guess it wasnt giving the data

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.