PlayerAdded not running

So I have this code, and the PlayerRemoving will run just fine, but the PlayerAdded does not run. I do not know why, so any feedback is helpful.

local function CheckForBan(player)
	if SavedBans[tostring(player.UserId)] then -- and player.UserId ~= 106251901 then
		local timeSinceBanned = os.time() - SavedBans[tostring(player.UserId)].bannedTime
		local banLength = SavedBans[tostring(player.UserId)].banLength

		if banLength == "Perm" then
			player:Kick("You have been PERMANENTLY banned from this game. Contact a dev for a possible repeal")
		end
		if (timeSinceBanned / 86400) >= banLength then
			print("Ban is over for "..player.Name)
		else
			player:Kick("You are still banned for "..tostring(banLength - (timeSinceBanned / 86400)).." days")
		end
	end
end

game:GetService("Players").PlayerAdded:Connect(CheckForBan)
game:GetService("Players").PlayerRemoving:Connect(CheckForBan)

Do any errors appear? Try adding a print statement to see if it runs when the player joins. If the disconnect works fine I don’t see why the added won’t work since they use the same function.

change it to

game:GetService("Players").PlayerAdded:Connect(CheckForBan)
for _, Player in ipairs(game:GetService("Players"):GetPlayers()) do
    CheckForBan(Player)
end
game:GetService("Players").PlayerRemoving:Connect(CheckForBan)

hope this helps

There is maybe a chance that the PlayerAdded event was called after a player joins. So, it didn’t work.
In that case, maybe @D0RYU 's answer would work.