Better way to name waypoints

I have a train that use TweenService to move around. It uses waypoints to turn as shown in the picture below. It follows the waypoints based on the number in the waypoint name.
Example: W1,W2,W3, it would follow waypoints W1 then W2, and so on in acceding order.


This picture shows how the waypoints are named and how the train follows the waypoints
(BTW, IGNORE the red blocks for now, the BLUE NEON BLOCKS are the waypoints)

However, they is a extremely high amount of waypoints, and It takes forever to name all of them.
PLUS, if I need to add a waypoint into the existing waypoint system, I would have to rename everything

Does anyone know a better way to name all of them. I cant thing of any ideas.

Sorry for my bad english

1 Like

If you wanted to not have to place as many waypoints i would use lerps and bezier curves. that would allow for you to have 4 or 5 waypoints and give you almost the same result.

2 Likes

for index, object in game.Selection:Get() do object.Name = "W"..index end
just select them in order and run the command :person_shrugging:

1 Like

I will try both of your idea later, thanks you

do you know what or how to do this? read many about this but i still dont know what it is

It is a lot of lerping

Kind of a bad example here but

What I’m doing here is 3 different lerps.

one from the bottom left to the top left
one from the top left to the top right

Then lerping between the two using the same time value
here’s an example of that code

`local Model = script.Parent

local Part1 = Model.Part1
local Part2 = Model.Part2
local Part3 = Model.Part3
local Mov = Model.Mov

for i = 1,20 do
local LerpPosition = i/20

local Lerp1ToLerp2 = Part1.CFrame:Lerp(Part2.CFrame, LerpPosition) 
local Lerp2ToLerp3 = Part2.CFrame:Lerp(Part3.CFrame, LerpPosition)


local Combined = Lerp1ToLerp2:Lerp(Lerp2ToLerp3,LerpPosition)

Mov.CFrame = Combined
task.wait()

end`

really simple
Im not sure if this is the true way of doing it. But it gives a good result

thanks, im using bezier curves now after some research, i think its better than waypoints. thank youu