As I'm not very good at making DataStores, I just found a script on Youtube. For some reason it messed up the data it was storing by making all the stats the same value. Now I fixed it, but I wanna reset the DataStores. Here is the (server)script I'm using(part of one big stats script):
local strengthData, rebirthsData
local success,errormessage = pcall(function()
strengthData = DataStore:GetAsync("strength-"..player.UserId)
rebirthsData = DataStore:GetAsync("rebirths-"..player.UserId)
end)
if success then
if strengthData then
strength.Value = strengthData
end
if rebirthsData then
rebirths.Value = rebirthsData
end
end
end)
game.Players.PlayerRemoving:Connect(function(player)
local success, errormessage = pcall(function()
DataStore:SetAsync("strength-"..player.UserId,player.leaderstats.Strength.Value)
DataStore:SetAsync("rebirths-"..player.UserId,player.leaderstats.Rebirths.Value)
end)
end)

3 comments
Are you using datastore2? If not i cant help. D:
I honestly have no idea. How can you tell?
just change the key