I downloaded your project, and got it to work.
The problem was that KinematicBody2 was a child of KinematicBody, instead of being a child of Spatial.
I changed the Scene tree to:
Spatial
.... KinematicBody
.... .... MeshInstance
.... KinematicBody2
.... .... MeshInstance
.... Camera
Then I set MeshInstance >> Transform >> Translation to (0,0,0) for both nodes, and then moved the two KinematicBody's apart.
The "var target" has to be changed:
onready var target: KinematicBody = get_node("/root/Spatial/KinematicBody2")
After that it works.
You can attach this script to KinematicBody2 to make it a moving target:
extends KinematicBody
func _physics_process(delta: float) -> void:
translation += Vector3(-.001, 0.001, 0)