Niagara system works in Differed but not Path tracing

So I found an awesome Particle system from a guy on Instagram. However when I try to render it in Path tracer its doesn’t work as intended. It works with Deferred but that’s not what I want to use. I’m not sure why it doesn’t work and I’m not a big math guy. Can anyone tell me whats wrong. Here are some pictures showing whats happening.

The Code

The output of this is going into the World Space Offset of the Material.

Deferred

PathTraced