It would not crash if I replace 'speech-bubble' with 'flying-text'.
Code: Select all
                
                entity.surface.create_entity {
                    name = 'speech-bubble',
                    position = {x = entity.position.x, y = entity.position.y + 1},
                    text = entity.energy .. 'J',
                    lifetime = 10
                }



 
 
