So in my game I have a couple savefiles which a player can save their data to and wipe the data. Whenever the press the reset button to reset a savefile this pops up:
18:25:55.953 - 502: API Services rejected request with error. HTTP 500 (Internal Server Error) 18:25:55.954 - Stack Begin 18:25:55.955 - Script 'ServerScriptService.DataHandler', Line 135 18:25:55.956 - Stack End
This is the script btw
RS.DataController.RemoveData.OnServerEvent:Connect(function(player,desiredSaveFile)
if not savingData then
savingData = true
if desiredSaveFile == "SaveFile1" then
saveFileToRemove = saveFile1
print("Resetting Save1")
elseif desiredSaveFile == "SaveFile2" then
saveFileToRemove = saveFile2
print("Resetting Save2")
else
saveFileToRemove = saveFile3
print("Resetting Save3")
end
for dataIndex, data in pairs(saveFileToRemove) do
data:RemoveAsync(player.UserId)
if dataIndex == "Name" then
local success, newData = pcall(function()
return data:GetAsync(player.UserId)
end)
if success and savingData then
RS.DataController.LoadData:FireClient(player,newData,desiredSaveFile,"Reset")
savingData = false
break
end
end
end
end
end)
This line to be precise is line 135
data:RemoveAsync(player.UserId)
Yesterday this code worked normally, but when I tried again today the error message suddenly popped up. Also this error pops up both when I play test in studio and when I enter the game from the roblox website. I can't find any error in my script but there may be. If it is a bug caused by roblox itself then I suppose there is nothing I can do about it.

2 comments
You pretty much just explained everything! + 1 to you
Everything are good now