How to recreate this zig zag effect?

robloxapp-20240408-0920553.wmv (2.3 MB)

How would I recreate the zig zag effect shown visible by the TrailEffect in this video. I’m aware how to make the trail and have recreated a similar particle and I am aware on how to make a profile from point A → B, but how would I make the part move around to recreate that zig zag effect. I’ve also denoted a hypothesis that this ‘effect’ would be created by a math equation but I am unsure of where to begin and how to feed this in. Any assistance would be helpful, thank you.

You can perhaps use a catmull-Rom spline