I'm trying to create some kind of endless shooter and I've copying the GDScript from this video.
It works just for a few seconds because the scene pauses itself and sends me back to the editor, It shows me an error on the debugger area, and I don't know what maybe causing this.
https://youtube.com/watch?v=qd0UTOQ_la8

The script is exactly the same, only difference are files names's. but EnemySpawner scene makes the game pauses and returns me to the editor, and the debugger console shows me this

I've been trying to fix it, the scene keeps pausing itself randomly, and I have to manually resume the scene, idk what causes this.