Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | erikthegreat2 |
When i try this code i get the error(6,1): The method “get_node” isn’t declared in the current class
onready var head = get_node("Head")
I dont understand what i need to fix? I have the script connected to my player node, wich has a child node called “head”, so thats not the problem.
What does the rest of your script look like? Specifically, what does it extends
at the top?
kidscancode | 2020-04-08 17:20
wich has a child node called “head”
Node-names are case-sensitive. If your child node is called “head”, then you need to call get_node("head")
, not get_node("Head")
. If that’s not the issue, you either forgot the extends
-line at the top of your script or are extending something custom.
njamster | 2020-04-08 23:01