Skip to content

MidTrackObject Segment

Creates an object, either a BasePart or a Model, that is positioned at a given point in the track.

Compared to TrackObject, will position the object between two TrackPositions.

MidTrackObjectSegment

Extends Segment

MidTrackObjectSegment : Segment {
    Object : BasePart | Model,

    Offset : CFrame,

    UseLookVector : boolean
}

Properties

Object

The part used to make the rails. This will be cloned each time a new segment is created.

Offset

The offset from the CFrame

UseLookVector

If true, uses LookVector and applies no rotation.

Constructors

fromData

MidTrackObjectSegment.fromData(data: table) -> MidTrackObjectSegment
data
{
    Name : string,

    Object : BasePart | Model,

    Offset : CFrame,

    UseLookVector : boolean
}

fromInstance

MidTrackObjectSegment.fromInstance(instance: Instance) -> MidTrackObjectSegment
instance Children
{
    Object : BasePart | Model,

    Offset : CFrameOffsetInstance,

    UseLookVector : ?BoolValue,
}

MidTrackObjectSegmentBuilder

Constructors

new

MidTrackObjectSegmentBuilder.new() -> MidTrackObjectSegmentBuilder

Methods

WithObject

MidTrackObjectSegmentBuilder:WithObject(object : BasePart | Model) -> self

WithOffset

MidTrackObjectSegmentBuilder:WithOffset(offset : CFrame) -> self

WithUseLookVector

MidTrackObjectSegmentBuilder:WithUseLookVector(useLookVector : boolean) -> self