Welcome to the forums @timdiggerm!
There is a minor, but important difference between the two.
new
creates a new instance of the class. It will create a node of the type the class extends, and will return that node (plus the custom script) and place it into the variable. This is useful for when you want to add a new node of a custom type, as you do not have to go through the instancing process to add a custom node to the scene.
However, because it is just the class, you only get the node it extends (plus the custom script), nothing else is added.
instance
creates a new instance of the scene, which includes the class but also any sub-resources (nodes, textures, etc). While new
creates just the node and it's script, instance
takes everything in the scene file, duplicates it, and places it into the variable. This means all of the child nodes and other sub-resources are copied and ready to be used.
This is helpful for when you want to "spawn" something in, as you often want the entire scene tree. For example, if you are wanting to add a coin to the scene with code, you will want to use instance so the root node, the visuals, collision shape, etc, is added. instance
and new
are identical if the scene you are instancing has only a single node.
With either method, you still have to add the node(s) to the scene using add_child
, as both methods create nodes that exist only in the variable until added as a child of a node.
Hopefully that helps clear it up a bit. I wrote the above quickly, and there are almost certainly better explanations of the differences between the two. Also, there may be other differences, but I just wrote what I have found to be the biggest differences in practice, based on my Godot experience.