Data Store not working properly

So I have this data store that isn’t working, it used to work before and I did not change anything with the script.

local DataStore = "GameTest"

game:GetService("Players").PlayerAdded:Connect(function(newPlayer)
	local vs = script:WaitForChild("Data"):clone()
	vs.Parent = game:GetService("ReplicatedStorage").PlayersData
	vs.Name = newPlayer.UserId
	local Data3 = vs:GetChildren()
	local S2 = {}
	for i=1,#Data3 do
		local n = Data3[i].Name
		S2[n] = Data3[i].Value
	end
	if newPlayer.Name ~= "Player" then
		local DataStore4 = game:GetService("DataStoreService"):GetDataStore(newPlayer.userId,DataStore)
		if DataStore4:GetAsync("Data",DataStore) == nil then
			DataStore4:SetAsync("Data", S2,DataStore)
		end
		S2 = DataStore4:GetAsync("Data",DataStore)
	end
	local vv = vs:GetChildren()
	for i=1,#vv do
		local n = vv[i].Name
		if S2[n] ~= nil then
			vv[i].Value = S2[n]
		end
	end
end)

game:GetService("Players").PlayerRemoving:connect(function(p)
	local DataStore5 = game:GetService("DataStoreService"):GetDataStore(p.userId,DataStore)
	local Data2 = game:GetService("ReplicatedStorage").PlayersData[p.userId]:GetChildren()
	local s2 = {}
	for i=1,#Data2 do
		local n = Data2[i].Name
		s2[n] = Data2[i].Value
	end

	DataStore5:SetAsync("Data",s2,DataStore)
end)

I got errors at line 16 and 38 saying

  21:58:04.232  Unable to cast to Array  -  Server - DataStore:38
  21:58:04.232  Stack Begin  -  Studio
  21:58:04.232  Script 'ServerScriptService.DataStore', Line 38  -  Studio - DataStore:38
  21:58:04.232  Stack End  -  Studio

There is a folder in ReplicatedStorage called “PlayersData” incase you want to know.

Hello. Please pay attention to line 30, namely the data name, you must use one value. For example: local DataStore5 = game: GetService (“DataStoreService”): GetDataStore (p.userId) also use pcall function .
I hope I helped you, have a nice day!

Your calling datastores incorrectly:

if DataStore4:GetAsync("Data",DataStore) == nil then
			DataStore4:SetAsync("Data", S2,DataStore)

and you should really wrap it in a pcall to catch any errors:

-- Get Data from DataStore
local PlrData
local success, err =pcall(function()PlrData=DataStore4:GetAsync(newPlayer.userId) end)
if not success then warn(err) end
		
-- Save Data to DataStore
local success, err =pcall(function()DataStore4:SetAsync(newPlayer.userId, PlrData) end)
 if not success then warn(err) end