Having issues with the lights in my game!

Godot 4.4

For context I’m following this tutorial, and I’m adding some extra flair to the grenade explosion animation. I added a flashing light that’s just a pointlight2d that disappears after the animation is over. Here’s a video of the issue.

I’m unsure why the lights eventually disappear after several grenades are spawned. The lights do not disappear if only the laser muzzle flash is going off, only once grenades are thrown.

edit: SOLVED

The issue I was having was the grenade was not being removed from the scene after disappearing. So even though the lights were not visible, the scene was rubbing up against the 16 light limit, which caused the lights to disappear. I added a timer to the grenade in order to remove it from the scene.

can you share the code of the extra “flair”

Sure. Here’s the player code, which controls the grenade

I can only post one image at a time so here is the grenade’s animation as well

what about the laser animation?