Change this line:
onready var raycast = "../head/camera/RayCast"
to this:
onready var raycast = $"../head/camera/RayCast"
The original is making raycast be a string containing the path. The dollar sign makes Godot look for the node specified by the path and put that in raycast.
(You can also do onready var raycast = get_node("../head/camera/RayCast") the dollar sign is a shortcut for get_node)