As you can see below, I have a variable called "olddata". It uses GetAsync on a key dependent on player userids. According to the Wiki, if the key doesn't exist, it should return nil. I tested this out on a brand-new account, and alas, it didn't return nil. Does anybody have a solution to this?
local olddata = game:GetService("DataStoreService"):GetDataStore("Pokemon"):GetAsync("user_"..newPlayer.userId.."_Pokemon") if (olddata ~= nil and olddata ~= "1") then --stuff end
Bug was in a different script, not these 4 lines of code. It has been resolved.