Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Making a model train follow placed track?

Asked by 12 days ago
Edited 12 days ago

Hello,

I am working on a Tycoon game with a placement system that allows players to place models. I want the players to be able to place rails and then buy a train and place it on a specific track so the train follows the track.

I have 2 track pieces. (Straight, Turn). I have heard of making it tween between nodes but my issue is finding out what is the next and previous railroad piece so it can seamlessly go over to that track.

The players will be able to place the tracks so I wanna make sure it’s dynamic. I have not found a answer anywhere.

Thanks in advance.

Screenshot of tracks: https://prnt.sc/ts7bne

0
Lots of ways to do this. I would put object values under each node that points to the next node. Then use "getTouchingParts" at the end of the node to set the last node's object value to the first node of the next track (name the first node "NODE1") and tween between them ad infinitum. radiant_Light203 345 — 12d

Answer this question