PathFollow (3D) Changing Offset in c# code not working

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

Every tutorial I’ve seen for PathFollow nodes (both 2D and 3D) says to just change the offset of the PathFollow node to move the node along the path (which should be its parent if I understand correctly). That works when manually changing the value of the offset in the inspector, however when I run the following code:

 public override void _Ready()
        Testing = GetNode<PathFollow>("Path2/Path2Follow");
        Testing.Offset = 0.0f;
public override void _Process(float delta)
            Testing.Offset += OffsetAmt;
            GD.Print($"increase: {Testing.Offset}");

            Testing.Offset -= OffsetAmt;

with the input actions assigned in the project input map (to arrow keys), the print statement says the offset is NaN.
This is my scene setup:
Godot Scene Organizer with the following nodes: A node called main as the main node, a Path node called PathTest with hidden children, a currently invisible Spatial node called Spheres with hidden children, a Spatial node called Spatial with a Camera node as a child,  and a Path node called Path2 with a PathFollow child called Path2Follow which has a MeshInstance child called MeshInstance. The 3D scene is also visible, showing a jagged path with a cube on one of the corners.

Am I missing something or doing something wrong? All I need it to do is be able to move an object along a path (3d) node either backwards or forwards, depending on an input value. Additional information can be given and any help is appreciated.

:bust_in_silhouette: Reply From: wooshuwu

I deleted my original path node and its children and made new path, pathfollow and meshinstance nodes and adjusted the nodepath in the code and then the code worked as expected. I might refine this project later and upload it to github for others to use.