Skip to content

TrackObject Segment

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

Similar to ties in NewSmooth.

TrackObjectSegment

Extends Segment

TrackObjectSegment : 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

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

    Object : BasePart | Model,

    Offset : CFrame,

    UseLookVector : boolean
}

fromInstance

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

    Offset : CFrameOffsetInstance,

    UseLookVector : ?BoolValue,
}

TrackObjectSegmentBuilder

Constructors

new

TrackObjectSegmentBuilder.new() -> TrackObjectSegmentBuilder

Methods

WithObject

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

WithOffset

TrackObjectSegmentBuilder:WithOffset(offset : CFrame) -> self

WithUseLookVector

TrackObjectSegmentBuilder:WithUseLookVector(useLookVector : boolean) -> self