help! godot kep calling this error, this is the code:
onready var Alien = get_tree().get_root().get_node("Level 1/Alien")
onready var muzzle = get_tree().get_root().get_node("Level 1/Player/Muzzle")
func _ready():
if Global.araragi:
#var copy = preload ("res://Actors/Alien.tscn")
var copy = Alien.duplicate()
owner.add_child(copy)
copy.transform = $Muzzle.global_transform
the error is in the line "owner.add_child(copy)" I used duplicate and preload but none works, I even use the print to know that "copy" exist and tells me its name is KinematicBody2D:1261, but still doesnt work.
I used a similar code in other scene and worked fine.