Hi I am working at a space shooter and I have a problem with the collision system.
This is the code:
Global.player_alive = false
Global.asteroid = self
if Global.world != null:
func instance_node(node, location):
var node_instance = node.instance()
node_instance.global_position = location
Long story short when the player hit the asteroid instead of playing the explosion animation of asteroid just crashed and this error show. I don't know exactly how to fix it.
Thank you and I wait an answer from you guys.
P.S. what is strange that sometimes works fine.