hi,
for the error "Invalid access to property or key value on a base object of type null instance".
How do you instantiate the bullet? And to see if it is the bullet that is the problem, comment out queue_free() in the body entered function and check if the error is still there.
How to return a value going from 30 to 0?
You can use the clamp(value, min, max) method to force the value to be between 30 and 0. like clamp(value, 0, 30)
I would suggest to create an export variable for the min and max so its easier to change the values and reuse the bullet script for other bullets or so.
How can I make the game not crash with the second bullet hit by an enemy?
It is difficult to say since we don't have all the code to debug and check for errors. My suggestion is to comment out the queue_free() function in the bullet and see if the error is still there.
How and where are you creating the bullet?
In the Debugger tab under Stack Trace it will show the functions that were called before it crashed. Can you send a screenshot of the code in those functions?
What is the code? Where to put it?
These questions are way too vague and will most likely be ignored. Not having all the code of your project makes it very difficult to code a solution.