I have a module that handles bullet shooting/collisions, however this delay function does not fire if the player dies before hand? to my knowledge, the delay function should still run regardless.
In my own tests, if the Local Script is terminated before the length of the Module Script’s delay() is reached, then delay() will not go on to spawn another thread.
I don’t understand exactly why that happens. Hope someone can follow up with more technical details.
From what I’ve seen when you require a module you’re basically cloning all the code inside the script who required it, specifically in a dictionary, that means if the requiring script gets destroyed the module will lose the connection and so stop the delays, the waits etc… A solution would be to let a localscript that handles the general graphics and effects inside PlayerScripts manage that, either passing the part trough an event or moving the whole script to it.