i'm trying to instance the bullet scene instead the main scene and i'm having this error:
parent node is busy setting up children, addnode() failed. Consider using calldeferred("add_child", child) instead.
the script is attached to the player node, direct child of the scene node.
func _ready():
var bulletscene = load("res://scenes/bullet.tscn")
var bullet = bulletscene.instance()
get_node("/root/level").add_child(bullet)
set_process(true)
set_process_input(true)