LvieReal
(Lvie)
#21
Reset your data
game:GetService("DataStoreService"):GetDataStore("LeaderStatSave"):RemoveAsync(your user id)
and then replace function when player leaves with this:
plr.AncestryChanged:Connect(function()
if plr:IsDescendantOf(game) or typeof(temporalData[plr.UserId]) ~= "table" then
return
end
should then save correct data
1 Like
LvieReal
(Lvie)
#22
replace it with this
if typeof(temporalData[plr.UserId].Abilities) ~= "table" then
temporalData[plr.UserId].Abilities = {}
end
1 Like
I don’t understand by “Replace”
Zerin107
(Zerin)
#24
That could be one way to solve that, but the code ran past that and just left it at nil even tho he checked if it equals nil
LvieReal
(Lvie)
#25
Copy the lines of code I sent over your code
Works! Hopefully it doesn’t break.
LvieReal
(Lvie)
#27
In case it happens again, just do this:
local data = ds:GetAsync(plr.UserId)
temporalData[plr.UserId] = typeof(data) ~= "table" and {} or data
system
(system)
Closed
#28
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.