Invalid type in function 'get_node' in base 'KinematicBody ('. Cannot convert argument 1 from Nil to NodePath.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ragacakaci

extends KinematicBody

export (NodePath) onready var head = get_node(head) as Spatial problem here
export (NodePath) onready var model = get_node(model) as Spatial
export (NodePath) onready var camera = get_node(camera) as Camera

onready var Camera = $head/Camera
onready var meleee_anim = $AnimationPlayer
onready var melee_anim = $AnimationPlayer
onready var hitbox = $head/Camera/Hitbox
onready var ult_anim = $AnimationPlayer
var melee_damage = 34
var meleee_damage = 23
var ult_damage = 200

:bust_in_silhouette: Reply From: SteveSmith

You’re trying to set head to be the result of get_node(head), i.e. itself.