Skip to main content

Servo

Spins objects attached to the hinge at the front when powered, to set angles.

Polysilicon can be used to control its angle.

  • Activate will increment the goal angle by the configured angle step (clockwise looking at its face).
  • Deactivate will decrement the goal angle (counter-clockwise).
  • FlipFlop will reset the angle to 0.

Microcontrollers can also set a servo's angle with :SetAngle(targetAngle) It is a craftable and spawnable non-flammable solid.

Here is a list of possible sizes that reach the maximum malleability (144) that have integer components: 1x1x144, 1x2x72, 1x3x48, 1x4x36, 1x6x24, 1x8x18, 1x9x16, 1x12x12, 2x2x36, 2x3x24, 2x4x18, 2x6x12, 2x8x9, 3x3x16, 3x4x12, 3x6x8, 4x4x9, 4x6x6

At its default size (2x2x2) it has a durability of 10, at its maximum size it has a durability of 27.

By default, its colour is #a3a2a5.

It requires 1 Motor and 2 Wire to be crafted.

Methods


SetAngle(angle)

Sets the target angle of a servo just as would if you were configuring it.

The angle parameter is the angle of the servo in angular degrees. It is a number.

Configurables


Angle

Determines the angle of the servo. When configured with a value outside of the specified range, it will be calculated modulo 360 (i.e., 360 ⟹ 0, 375 ⟹ 15, -10 ⟹ 350). It is a number. It ranges between 0 and 359.


AngleStep

Determines the change in angle when a pulse is received by Polysilicon. It is a number. It ranges between -180 and 180.


Responsiveness

Determines how fast the servo attempts to correct its angle. It is a number. It ranges between 0 and 90.


ServoSpeed

Determines the speed at which the servo is driven. It is a number. It ranges between 0 and 20.

Events


Configured(configurerId)

Fires when the object is configured.

The configurerId parameter is the UserId of the player who configured the object. It is a number.