#Train Pathing System Help

1 messages · Page 1 of 1 (latest)

brazen sentinel
#

So i have this script which is supposed to tell my train where to go how fast to go and so on. It was working fine before but that was with a normal straight forward train track.
I have wanted to add system where at certain points the train can either stop like going into a station or skip it completely based on config values. Below I have listed my current code, i am getting no errors but also getting no working code.

brazen sentinel
#

help

brazen sentinel
#

help

junior magnet
#

@brazen sentinel could you please paste your code in text format? the folder isn't working for me

junior magnet
brazen sentinel
#

no like i can not post

junior magnet
#

oh?

#

break it up into 2 messages

#

how many lines is it?

brazen sentinel
#

i lit can not

#

it will be like 6 messages

junior magnet
#

oh hold on

#

okay the folder is accessible now

#

let me take a look

#

@brazen sentinel this script was pasted into a part, yes?

brazen sentinel
#

its in server script server

#

as a normal script

junior magnet
brazen sentinel
junior magnet
# brazen sentinel yes

Okay, just to clarify, the script has no errors, however, it does not work as intended? In your earlier message, you mentioned:

i am getting no errors but also getting no working code.

How is it dysfunctional? Where is the area in the script you most likely believe there to be an error?

vague summitBOT
#

studio** You are now Level 1! **studio

brazen sentinel
#

which it doesnt

junior magnet
#

additionally, which local in the script is used to define the green light?

brazen sentinel
#

green light is in the code is it notr

brazen sentinel
junior magnet
#

or named

brazen sentinel
#

wym

#

its just here mStartPart.Parent.SignalStuff.GreenLight

#

its a part color

junior magnet
brazen sentinel
junior magnet
brazen sentinel
#

not at the top

#

in the code

#

at the bottom

junior magnet
#

look at the search bar

#

it isn't mentioned

#

or perhaps

#

maybe you copied the segment that doesn't include it

#

because at the very bottom it says

#

... (254 lines left)

brazen sentinel
#

at the bottom

junior magnet
#

lerp is the green light?

brazen sentinel
#

Can you not see all the code

junior magnet
#

in that code

brazen sentinel
#

Yes

#

At the bottom

#

I don’t think you have the full cod

#

Even though it’s there

junior magnet
#

it cuts off at lerp

brazen sentinel
#

Or download it

#

It doesn’t do that for me

junior magnet
vague summitBOT
#

studio** You are now Level 2! **studio

junior magnet
#

Anyway, to resolve your issue:

I assume you have a function/local of some sort telling the train to slow down and stop, as shown in the video. However, we do not want this action to be performed at the green light, so:

Go to the area in your script where the train is supposed to do its task at the green light

Look for the "red light" function/local anywhere within that area, then replace it. It might take a few tries and definitely some experimenting to fix everything. You need to identify the area of incident (where the script is dysfunctional), look for a possible cause of said dysfunction, and then alter the script in that area. From what I've seen, I assume your train is following a "red light" protocol despite it being a green light