I’m trying to optimize a game i’m working on so we thought of using parallel lua. I learned how Parallel lua works and changed the scripts. However i have came across a problem. When ever the events connects (using RBXScriptEvent:ConnectParallel) the game crashes, testplay in studio crashes and disconnects players who are playing the game from the client. I honestly don’t know why is this occurring or what have i done wrong and i really need a solution
Here is the part of the code that uses parallel lua
Just a clarification, OnServerEvent being “Unsafe” means you can’t read the property in a parallel thread, not that you can’t use ConnectParallel on it.
The crash happens when you try to read or change something inside the parallel thread that is unsafe, i.e. changing the position of a part. This should be causing an error instead of crashing and isn’t functioning as intended.