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.
#Train Pathing System Help
1 messages · Page 1 of 1 (latest)
Current Code
so this is currently what is happening, the train is stopping even though the light is green
help
help
@brazen sentinel could you please paste your code in text format? the folder isn't working for me
its a bit long
that's fine
no like i can not post
200-300 i think
i lit can not
it will be like 6 messages
oh hold on
okay the folder is accessible now
let me take a look
@brazen sentinel this script was pasted into a part, yes?
no
its in server script server
as a normal script
something like this?
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?
** You are now Level 1! **
yes
well pretty much it works but when i am doing the transform i expect it to skip the end block to the next one
which it doesnt
where is the transform
additionally, which local in the script is used to define the green light?
not a local script
green light is in the code is it notr
Translation
what is it defined as
or named
is that in the script?
yes
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)
lerp is the green light?
i'm asking where the green light is
in that code
In the code?
Yes
At the bottom
I don’t think you have the full cod
Even though it’s there
that is impossible for me to do
** You are now Level 2! **
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