You have the distance value going between function calls. It will not exist anymore once the Update Particle Length event is called.
I’m guessing you want to run the trace and get a new distance value on every update. If so, you would need to move the line trace node to the execution chain of Update Particle Length instead. You would also need to do the math for the start and end vectors of the line trace node to specify where the trace starts and ends.