How do I make nodes in a block

I am trying to make a train move with nodes, and I want to know how I make new parts for being a node center of a block, but the front and back distance changes, like below


Here the blue dots is how I want to make a script and keep them like the center of the block but the front and back changes

How do I make a script which makes nodes like this

Do you care how they are spaced? Do they need to be exact, or can they just be approximate?

They need to be at first and last and at curves so I can use them to make a train system

You’re overcomplicating it if you want to make a train with carts just use rods for the joints and hinges for the wheels

Um actually I have a train already, and it moves on it, the problem is its derailing easily because the train has lots of content and laggy, so to avoid that, many games like jailbreak makes their trains using CFrame node system and to do that you need to make irregular nodes at regular distance but not at constant orientation blocks