I run the script
func search():
var pl = get_parent().get_parent().get_player()
and I get the error Non-existent function 'get_player' in the base 'Viewport'.
what to do?
I have to get from the parent node
func get_player():
return $Player
but an error comes out Invalid call. Nonexistent function 'get_player' in base 'Viewport'.