How to get one side of a part to stick to another part's position

Basically what i’m trying to do is:

I have a bullet (raycast).

When you move or jump the bullet stays in its original position until it’s been deleted.

I’m trying to make it so the starting point of the bullet stays attached to the barrel of the gun while the other side stays where it was shot.

Original side - >---------------------------| ← where bullet stopped (the position of this side should not change)

The original side’s position however, should change, depending on the position of the barrel?

How could I do this?

If you really want to know how to do this, you will need to constantly update the parts CFrame using Renderstep until the effect is gone. I would probably use BindToRenderStep() for this, so you can hook into Renderstep only when you need to, and then unbind.

Thank you so much, was a lot easier than I would have expected!

Ended up with this, nearly flawless on the client side.

https://streamable.com/ddaa3f