Creating paths using two points ( Railway )

How can I create railway tracks using two points?

Let’s say I have part A and B. A path is created between these points.
I need the most convenient way to create railway tracks quickly and easily

UPDATE: Im already have track model, I need to fill it with them.

3 Likes

Not a direct fix, but I would use This Plugin when I want to make complicated shapes for paths like in the second example. You’d get a shape on which you can build the railway yourself. There might be a plugin that specializes in this, but I’m not sure

In the other two, have a segment of track already made and then use Ropeater (Bless stravant)

Unfortunately, this is not what I need

Thanks for the feedback!)

Im already have track model, I need to fill it with them by the analogy I gave in the post.

I didn’t quite understand what you want to achieve in this.

https://www.youtube.com/results?search_query=Road+spline+roblox+studio

Instead of small cubes, I need rails to line up there.

just create bezier curves with them get the average position and set that as an anchor point then with that split it up into even pieces and cframe them, where the lookat matrix is facing the next point, if it is the last then it is facing the previous lookat matrix. then the scale for each is equivalent to the distance between the two nodes

1 Like

Can I give you some details? This is the first time I’ve encountered this

function lerp(a, b, t)
      return a + (b - a ) * t
end

function bezier(a, b, c, t)
     return lerp(a, b, t) * lerp(b, c, t)
end

basically this is what a bezier passing 3 points and the t or i from a for loop u can make a bezier path.

look all you are doing is you have this graph right, thats the line segments and their domain is from PartA to PartB. Look at this from a top down 2d perspective. Generate the graph with a bezier curve, hermite splines, whatever you choose you will basically get the x depth of partA and the x depth of partB, for loop that for each stud, then for each stud calculate the output aka y value (in this coordinate system, z) of the node. put your nodes in a table, this table will grow exponentially based on your resolution/how many times you wanna loop through. then go through each node and scale it and make the pieces look at the next node correspondingly

2 Likes