game.Players.PlayerAdded:Connect(function(plr)
local S,E = pcall(function()
local GotAsync = DataStore:GetAsync(plr.UserId)
end)
if S then
if E then -- what will cause this to fire?
COMMUNITY QUESTION
What will cause a pcall of getasync to fail?
1 answer
The pcall function is there because it is not guaranteed that the player has data already saved. If the DataStore can't find the data saved, it will return an error.
1 comment
0
This is simply not true.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
if there is no plr data or the game has a problem with getting data from roblox
Data store requests are web requests, and you can't guarantee that all web requests will be always successful.