Skip to main content

Detection Parts

Trains use 2 parts that are positioned on the rails to detect changes that the client or server should change something. Track circuit parts, however, are separate, and are moved above each carriage for larger detection parts to detect them. None of these parts require or check for any children, unlike pre-2.0. All of these parts must be in the correct carriage, in the DetectionParts folder. All of these parts will be given an appropriate CollisionGroup when they are registered with the train system, you don't need to change this manually.

Parts

TrainDetectPart_F

image.png

  • Positioned on the rail on the right side of the train, in the first carriage.
  • Should be around 1 x 2 x 1 studs in size, but this doesn't really matter as long as it does not encompass over half of the track.
  • Will be given a CollisionGroup of TrainDetectPart on registering

TrainDetectPart_B

image.png

  • Positioned on the rail on the left side of the train, in the last carriage
  • Should be around 1 x 2 x 1 studs in size, but this doesn't really matter as long as it does not encompass over half of the track.
  • Will be given a CollisionGroup of TrainDetectPart on registering

CircuitTrain_DetectPart

image.png

  • Positioned approximately above the rails
  • Should be at least 3 studs tall to ensure detection
  • Will be given a CollisionGroup of CircuitTrain_DetectPart on registering

JointTrigger

image.png

  • Positioned across the rails - doesn't specifically have to touch either rail
  • Should be around the Y position of the rails
  • Will be given a CollisionGroup of JointTrigger on registering
  • These parts should be aligned to where the train wheels touch the rails, and they will produce a sound when a train passes them