Sim_Q1
(Sim)
January 6, 2023, 9:54pm
#1
Hi there,
Every time I load my game I keep getting a error that is saying this:
What Can I do to make this go way?
local Players = game:GetService("Players")
local DSS = game:GetService("DataStoreService")
local DS = DSS:GetDataStore("SaveData")
Players.PlayerAdded:Connect(function(plr)
wait(6)
local plrkey = "id_"..plr.UserId
local savevalue = plr.leaderstats.Pounds
local savevalue2 = plr.leaderstats.Bounty
local savevalue3 = plr.leaderstats.Kms
local GetSaved = DS:GetAsync(plrkey)
if GetSaved then
savevalue.Value = GetSaved[1]
savevalue2.Value = GetSaved[2]
savevalue3.Value = GetSaved[3]
else
local NumbersForSaving = {savevalue.Value, savevalue2.Value, savevalue3.Value}
DS:GetAsync(plrkey, NumbersForSaving)
end
end)
Players.PlayerRemoving:Connect(function(plr)
DS:SetAsync("id_"..plr.UserId, {plr.leaderstats.Pounds.Value, plr.leaderstats.Bounty.Value, plr.leaderstats.Kms.Value})
end)
If you can help me out that Would be great~
1 Like
tarneks2
(LeFort3)
January 6, 2023, 10:01pm
#2
Do you have any other scripts (freemodels perhaps) that could be giving off this error?
Ctrl shift f for these and delete whatever script uses them or delete the part that uses it.
It’s maybe because your code is deprecated or your game used DataPersistance before. Try checking for old models if any and check the code of it. Basically DataPersistance was a very old version of DataStores.
1 Like
Sim_Q1
(Sim)
January 6, 2023, 10:06pm
#4
I know I replaced the datastore script
Do you have any other script that saves data?
Sim_Q1
(Sim)
January 6, 2023, 10:08pm
#6
I got a Dealership one and a Tools Save data
Does it use DataPersistance or any deprecated code ?
Sim_Q1
(Sim)
January 6, 2023, 10:10pm
#8
I can’t Find anything that I know of that uses it.
I checked more on this error rn but I found that it occurs only if the code uses it.
Can you tell me exactly on which line this error occurs ?
Sim_Q1
(Sim)
January 6, 2023, 10:13pm
#11
It doesn’t say what line it is nor the script
Oh, is your game too old though ?
Sim_Q1
(Sim)
January 6, 2023, 10:16pm
#13
Nah It Can’t be It’s only a year old
Oh, then try to update your game either. Also, I hope you have turned on API Services.
Sim_Q1
(Sim)
January 6, 2023, 10:19pm
#15
Yeah I do have API Services on.
Ok, try to update your game, like try “Save To Roblox” or “Publish to Roblox”. It’s the only way I can think of.
1 Like
Sim_Q1
(Sim)
January 6, 2023, 10:34pm
#17
Ok I found it. It Was The old Kohl’s Admin Commands
system
(system)
Closed
January 20, 2023, 10:35pm
#18
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.