Datastore is not working

Hello, I’m making a datastore for a game that I’m working on and for some reason the script isn’t saving the data.

I have enabled API services and HTTP Requests on my game and still no luck.

I’m unsure of what to really do from here so I came to ask is anyone knows why this script isn’t working and what I can do to fix it.

Script:

Error:
502: API Services rejected request with error. HTTP 403 (Forbidden)

I cant see any problem with your code. Try to copy and paste script from youtube without changing anything, if it’s gives error too that’s about roblox, i recommend switching accounts and reopening another place.
Can you try that?

local DataStoreService = game:GetService("DataStoreService")
DataStore = DataStoreService:GetDataStore('DataStore')
local RunService = game:GetService("RunService")
--[[ This Imports The Data ]]--
game.Players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player

	local stage = Instance.new("IntValue")
	stage.Name = "Night"
	stage.Value = DataStore:GetAsync(player.UserId) or 1
	stage.Parent = leaderstats
end)
--[[ This Saves The Data ]]--
game.Players.PlayerRemoving:Connect(function(player)
	local stage = player.leaderstats:WaitForChild("Night")
	warn("Stage Value Changed")
	DataStore:SetAsync(player.UserId, stage.Value)
	print("Saved ".. stage.Value .. " Stage For " .. player.Name)
end)
--[[ This Avoids Data Loss ]]--
game:BindToClose(function()
	if RunService:IsStudio() then
		wait(7)
	end
end)

The script you sent seems to work fine, not very sure why the other one was working but I’ll do research on it. Thank you for your help!