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: 1x256x1, 1x128x2, 1x64x4, 1x32x8, 1x16x16, 2x64x2, 2x32x4, 2x16x8, 4x16x4, 4x8x8, 16x8x2, 16x4x4

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 #a3a2a5.

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:

  • InstrumentType
  • number

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(deltaTime)

Fires when the object is updated by the game loop.

The deltaTime parameter is the 'time' since the last tick, it does not represent the actual time since the last tick was occurred, rather just how often a game tick should be fired (it will always be precisely 1). It is a number.