extends CharacterBody2D func die(): var emitter = preload("res://tscn/enemyhitbox.tscn").instantiate() get_parent().add_child(emitter) emitter.position = self.position emitter.emitting = true queue_free()