Huge Data Store Error?

I have absolutely no idea what is going on but I have this data store error. https://gyazo.com/ebc3b0764096532293dae846bbad3f75
What I did was make a datastore in a module and made a function that either loads or saves the players data.
The problem I have is whenever I call the module in a playeradded event, it errors for some reason. When I attempt to save data via the playerremoving event, It works but for playeradded when I try to see if it even prints it doesn’t. about the HTTP 403 error, I have tried researching it but I can’t find any good answers as people either say “You don’t have API Services/HTTP requests enabled” while I have both of them on. I am also the owner of my game. Here is a good grasp of my code pieces for the module side and playeradded event.
–Module (only includes when player is added)

function update.PlayerData(player, saveorload)
if saveorload == "load" then
		local s, e =  pcall(function()
			return playerdatastore:GetAsync("Player_"..player.UserId)
		end)
		local data
		if s then
		    print("successfully loaded")
			data = playerdatastore:GetAsync("Player_"..player.UserId)
			for i,v in pairs(data) do
				player:WaitForChild("Stats")[i].Value = v
			end
		end
		if e then
			warn(e)
		end
		if data == nil then
			local savedata = {
				Speed = 0;
				Damage = 5;
				Protection = 0;
				Level = 1;
				EXP = 0;
			}
						for i,v in pairs(savedata) do
				player:WaitForChild("Stats")[i].Value = v
			end
			playerdatastore:SetAsync("Player_"..player.UserId, savedata)
		end
            end
	end ```
--Script
```local update = require(game.ServerScriptService.Scripts["Data/Modules"].Update)
                       game.Players.PlayerAdded:connect(function(player)
                -- insert stat values here
      update.PlayerData(player, "load")
end)

Did you enable API services? (30 characters)

Yes, in my post I said I have both of them on.

Hmm that’s pretty weird (30 characterss)

I don’t notice any errors in the script itself, but this datastore error is annoying.

Go to the line that the stack is erroring on, and that may help you

If you are receiving that error I recommend making another place and seeing if the error is still happening. This should NOT be happening and if it is then theirs a issue with roblox, as for the code I recommend UpdateAsync over SetAsync as update will respect the previous value, and if a error rises then nothing will happen whereas with setasync there is the potential for it to overwrite whilst erroring

1 Like

Alright I’ll try what you said, also heres the part where the error is, it happens when im using setasync. https://gyazo.com/8c593b898c8acc9a38aa22facc71158f also a bit more information is I published the game through file since I couldn’t use data stores.

That error HTTP 403 || Forbidden can happen if you don’t already published your place, or you didn’t activate Enable Studio Access to API Services (under Game Settings > Security).

Try with it, that probably works!