Do either of those functions throw errors if you do them after checking with the variable? It might also be a scoping issue where playerAdds just does not exist in the scope that you are using it in.
do
local test = workspace
print(test) --Workspace
end
print(test) --nil
If you expect an item to exist, and aren’t going to be handling the case in which it doesn’t you should be indexing using [] and not FindFirstChild.
Ex: game.ServerStorage.PlayerAdds[player.UserId]
What Wulfe is referring to also is, does the behavior change when you index using a string vs a number? When you index with player.UserId vs tostring(player.UserId) does it make a difference?
If not, you should check if there’s a race in your code where the object may exist just before you index for it, or a similar issue.
Even with using [] it still prints out an error nil. As far as the string vs UserId, I don’t believe this should be an issue as I also have another folder named with the players UserId which doesn’t throw any errors.
If it errors with [] then that means it does not exist there and you should try checking why that may be. Maybe it gets destroyed before you use FindFirstChild on it?