Skip to main content

Instrument

A part that measures information about the world.

You can set it to measure one of:

  • Power is the total amount of power connected to the instrument.

  • Position is the position of the instrument in the world.

  • Orientation is the orientation of the instrument in the world.

  • Size is the size of the part attached to the instrument.

  • Speed is the speed of the instrument.

  • AngularSpeed is the angular speed of the instrument.

  • Temperature is the temperature of the instrument in Kelvin

  • TemperatureF is the temperature of the instrument in Fahrenheit.

  • TemperatureC is the temperature of the instrument in Celsius.

  • AirTemperature is the air temperature around the instrument in Kelvin.

  • AirTemperatureF is the air temperature around the instrument in Fahrenheit.

  • AirTemperatureC is the air temperature around the instrument in Celsius.

  • Time is the current region time. It is a craftable and spawnable non-flammable solid.

    Here is a list of possible sizes that reach the maximum malleability (256) that have integer components: 1x1x256, 1x2x128, 1x4x64, 1x8x32, 1x16x16, 2x2x64, 2x4x32, 2x8x16, 4x4x16, 4x8x8

    At its default size (3x2x2) it has a durability of 1, at its maximum size it has a durability of 3.

    By default, its colour is #000000.

It requires 1 Iron, to be crafted.

Methods


GetReading(type) → reading

Passing a number to GetReading is deprecated. Use the string name of the reading instead.

The type parameter can be any of the following types:

It can also be nil.

The reading return can be any of the following types:

  • number
  • Vector3
  • string

Configurables


Type

The type of instrument readout to display on the instrument. It is an InstrumentType.

Events


Loop(tickInterval)

Fires when the object is updated by the game loop.

The tickInterval parameter is the inverse of the tick rate. For example, if the tick rate is 20, this will be 1 / 20 (or just 0.05). If the tick rate commands are accessible, running them will change this value. It is a number.