Are Seat
or StationSensor
anchored?
StationSensor is anchored. The red block located on the rail is StationSensor and the seat is unanchored its welded with the train. Located on under the train.
What’s the class name of StationSensor?
Are you sure the Seat
reaches StationSensor
? The issue might be that the train lags and “jumps over” the sensor.
Maybe they could try using Region3 to detect when the Seat touched StationSensor if lag is the issue. I sometimes find that the Touch
event is unreliable when it comes to stuff like this.
Can you explain what is script.Parent.Parent
?
This is the train system I am using.
Can you try printing something if the condition has been passed?
For example,
if (child.Name == "StationSensor") and (child.Parent.DoorLeft.Value == true) then
print("true")
script.Parent.Parent.State.Throttle.Value = 0
script.Parent.Parent.State.Brake.Value = 10
wait(5)
script.Parent.Parent.State.Doorsystems.DoorL.Value = true
end
Looks like its not printing. The child.Parent is not wrokign?
Try printing child.Parent
then.
Not in the if
condition, before it.
Hm. Looks like both are not working.
It appears like the Touched
event is not being triggered. Are you sure that the Seat
touches StationSensor
?
If it 100% does, then check if any of them have unchecked CanTouch
in the Properties. Check them back if they are off.
Yep.
The sensor
Part seat
Are you using PhysicsService
by any chance?
This is it?
I see that you don’t.
I think that the Touched
event is pretty unreliable. You’ll need Region3
in order to achieve it.
No, it is not. You need to check the NetworkOwner
of the part. If it is different owner, it will not be reliable. Also make sure none of the assemblies are anchored. If it is they don’t touch.
I manage to find a way to make something different.
More Info about it
Automatic Train System - Resources / Community Resources - Developer Forum | Roblox