My player data saving code was working a few days ago and I haven’t changed it in a long time. However I noticed that my data hasn’t been saving. In my pcall function I printed the error message and it gave me HTTP 404 (Not Found). I couldn’t find anything about this other than one other post which said it was caused by saving data to invalid player id when making a local server with 2 players. I checked user ids of all the players who have played the game using DataStore:ListKeysAsync and I found no negative player ids. I have no idea what is causing this and all the roblox servers appear to be functional.
code and output:
local function SaveData(player)
if data[player.UserId] then
local attempt = 0
repeat
attempt += 1
local success, msg = pcall(function()
return database:UpdateAsync(player.UserId, function(currentData)
return data[player.UserId]
end)
end)
if not success then
task.wait(1)
print(msg)
end
until success or attempt == 5
end
end
Does anyone know why this is happening?
Edit: I attempted to view the history of the script to see if I changed anything that could cause this issue. Pressing view script history crashes roblox studio instantly.