I created an object in a scene and loaded a piece of code into it to implement a function. When its HP <= 0, the object disappears on its own. This code causes a crash as soon as it’s written in. (I wrote a hit test where pressing the spacebar reduces HP by 1. This works fine, but when HP reaches 0, a bug appears.)
P.S. As a new user, I can’t upload project files, so I can only provide screenshots.