the datastore does not always save, and when the player reEnters the game, it does not even Retrieve data.
local DataService = game:GetService("DataStoreService")
local DataStore = DataService:GetDataStore("Doesnnotd Matterrigh now")
game.Players.PlayerAdded:Connect(function(player)
local days = player:WaitForChild("leaderstats").Days
local Days_Data
local success, errorMessage = pcall(function()
Days_Data = DataStore:GetAsync(player.UserId.. "days") --(key, keyword) --you should make it a keyword, rather than a value
end)
if success then
days.Value = Days_Data
print("Retrived")
elseif errorMessage then
warn(errorMessage)
end
end)
game.Players.PlayerRemoving:Connect(function(player)
local days = player.leaderstats.Days
local success, errorMessage = pcall(function()
DataStore:SetAsync(player.UserId.. "days", days.Value) --(key, keyword, value)
end)
if success then
print(player," Has Left")
print("All Saved")
print(days.Value)
else
warn(errorMessage) --warn is like print, except in orange text, showing where the warning is
end
end)

6 comments
Yes, Api Services is Enabled
Are there any errors? If so, what does the errorMessage say?
no there are no errors, its just not saving or retrieving
Is it a ServerScript placed in ServerScriptStorage?
Is it a ServerScript placed in ServerScriptStorage?
yes