Heyo i have issue with my datastoring it wont save more then 2 which are Qi and Stamina other wont save no matter what i try i dont know if its fault in my script so i m seeking help.
local QiDataStore = DataStoreService:GetDataStore("Qi")
local StaminaDataStore = DataStoreService:GetDataStore("Stamina3")
local AgeDataStore = DataStoreService:GetDataStore("Age2")
local EprogressDataStore = DataStoreService:GetDataStore("Eprogress")
local TprogressDataStore = DataStoreService:GetDataStore("Tprogress")
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder", player)
leaderstats.Name = "leaderstats"
local Qi = Instance.new("IntValue", leaderstats)
Qi.Name = "Qi"
Qi.Value = 0
local Stamina = Instance.new("IntValue", player)
Stamina.Name = "Stamina"
Stamina.Value = 0
local Age = Instance.new("IntValue", leaderstats)
Age.Name = "Age"
Age.Value = 0
local Eprogress = Instance.new("IntValue", player)
Eprogress.Name = "Eprogress"
Eprogress.Value = 0
local Tprogress = Instance.new("IntValue", player)
Tprogress.Name = "Tprogress"
Tprogress.Value = 0
local playerUserId = "Player_" .. player.UserId
local success, qiData = pcall(function()
return QiDataStore:GetAsync(playerUserId)
end)
if success and qiData ~= nil then
Qi.Value = qiData
end```