How to make part move along a beam?

Hi, is there any way I can make the red part move along the white beam via a script?

You can use roblox pathfinding and add multiple points to curve on the beam.

You could use Bezier Curve or Use ROBLOX’s TweenService.