Hello Devs My Data Script Not Working ! 
My Script In ServerScriptService
My Script Code :
--// Script Locals
local DataStoreService = game:GetService("DataStoreService")
local DataStore = DataStoreService:GetDataStore("ServerPlayerData")
local RunService = game:GetService("RunService")
--// Main Script
game.Players.PlayerAdded:Connect(function(player)
--// Money
local Money = Instance.new("IntValue")
Money.Name = "Money"
Money.Value = 0
Money.Parent = player
--// Cars Inventory
local CarsInventory = Instance.new("Folder")
CarsInventory.Name = "CarsInventory"
CarsInventory.Parent = player
--// skin Inventory
local skinInventory = Instance.new("Folder")
skinInventory.Name = "SkinInventory"
skinInventory.Parent = player
--// Equipped Car
local EquippedCar = Instance.new("StringValue")
EquippedCar.Name = "EquippedCar"
EquippedCar.Parent = player
--// Equipped Color
local EquippedColor = Instance.new("Color3Value")
EquippedColor.Name = "EquippedColor"
EquippedColor.Parent = player
--// Equipped Spoiler
local EquippedSpoiler = Instance.new("StringValue")
EquippedSpoiler.Name = "EquippedSpoiler"
EquippedSpoiler.Parent = player
--// Data Values Creator
local data
local success, errorMsg = pcall(function()
data = DataStore:GetAsync(player.UserId)
end)
if data ~= nil then
if data.EquippedCar then
EquippedCar.Value = data.EquippedCar
end
if data.EquippedColor then
EquippedColor.Value = data.EquippedColor
end
if data.Money then
Money.Value = data.Money
end
if data.EquippedSpoiler then
EquippedSpoiler.Value = data.EquippedSpoiler
end
if data.CarsInventory then
for i, v in pairs(data.CarsInventory) do
local val = Instance.new("StringValue")
val.Name = v
val.Parent = CarsInventory
end
end
if data.Traps then
for i, v in pairs(data.Traps) do
local val = Instance.new("StringValue")
val.Name = v
val.Parent = CarsInventory
end
end
end
end)
game.Players.PlayerRemoving:Connect(function(player)
local data = {};
data.Money = player.Money.Value;
data.EquippedCar = player.EquippedCar.Value;
data.EquippedColor = player.EquippedColor.Value;
data.EquippedSpoiler = player.EquippedSpoiler.Value;
data.CarsInventory = {};
data.Traps = {};
for i, v in pairs(player.SkinInventory:GetChildren()) do
table.insert(data.CarsInventory,v.Name);
end;
for i, v in pairs(player.CarsInventory:GetChildren()) do
table.insert(data.Traps,v.Name);
end;
local success, errorMsg = pcall(function()
DataStore:SetAsync(player.UserId, data);
end);
if success then
print("Successfully Saved")
elseif errorMsg and not success then
warn(player.Name.."`s Data Save Error , Error Message : "..errorMsg)
end;
end);
