When making my game sometimes systems get pretty complex and often code relies on other code doing its job correctly or data being passed to remotes in order to execute. All this being said- when I write code I think
“if this doesn’t pass the right data something has had to go horribly wrong, therefore it’s not even worth putting in error handling to try to re-route”
My question is when is this a good philosophy and when will this put you in a hole.
You don’t need to. RBXScriptSignalEvents and their corresponding functions create their own threads which don’t yield or cancel the whole script thread.
I chuckled at this one, because no… no i wont lol. but the question is more sort of- when do i need to code for things im pretty sure wont happen, and if the answer is yes- to what length.
Use pcalls if you think a function might error, and use iterative loops for services that might fail. Methods like waitforchild() can help your code error less when trying to get objects not loaded
I guess if the code relies on other code or other code relies on it, and to the length where you can catch all exceptions and errors.
For example, you stated before your game has many complex systems that rely on other systems, You gonna have to make sure that what is relied on does not break.
You could also code for if the code is extremely important to the function of the game. One issue is that Roblox may release updates that accidentally break your game let’s say you were on a trip to Hawaii and they release the update in the middle of your trip,
if your code is flexible to errors, does not have other code relying on it, and is not too important to the function of the game. You won’t have to add more
Let’s say your code does not check these boxes. Good luck
You can never truly feel confident your code won’t break if it can break in many ways, limiting the ways your code can break will make you more confident it will never.
Im not sure I answered the question but I do think I approached the answer, too tired to add more