My game’s console log’s a lot of things using prints. These are mandatory as it helps be determine what’s going on, but the issue is when I’m not online the npc controller breaks. I’m not sure if an error outputted or not but I am not able to determine the issue. I’ve also not been able to replicate the problem in studio or in a singular server. This glitch happens in real time servers with players.
What I need help with is debugging this script, I have barely any information on what circumstances must be met for the script to break as well as no errors available (Since the output is always printing).
I have 2 solutions in mind:
- Remove ALL prints in game to see what’s going on with that script.
- Wrap the entire NPC Control in a pcall and if it is to error send a message to me via discord on the error.
The issue with these solutions is that 1, it’s heavy work and time consuming as well as 2, there may not be an error at all and may require prints to debug.
So what is standard practices for dealing with errors?