Welcome to Android Central! The S Pen works differently from the capacitative touch screen. It's possible for the touchscreen to fail and the S Pen to still work. If the problem persists after a reboot or in Safe Mode, then bring it to a repair shop.