PcoWSkbVqDnWTu_dm2ix

Making a Conveyor

Making a Conveyor

5 min

A conveyor is an object that moves materials or other objects, such as a conveyor belt that carries items through a production line.

While real-life conveyors are made of many parts, a conveyor in Roblox can be made with just one part.

  1. Insert a new block part.
  2. Use the Scale tool to resize the part into a long conveyor.
  3. Anchor the part (this step is critical, even if the part will be prevented from moving through other means).

Speed and Direction

A conveyor’s speed and direction is determined by its BasePart/AssemblyLinearVelocity|AssemblyLinearVelocity, an internal velocity which transfers to objects that touch the anchored conveyor part.

AssemblyLinearVelocity = 0, 0, 2
AssemblyLinearVelocity = -2, 0, -2

Note that the assigned speed/direction is relative to world space, not relative to the part. This means that if the conveyor part is rotated, the linear velocity will not update to reflect the new orientation.

Dynamic Calculation

To more accurately set the speed and direction of the conveyor, regardless of its orientation, follow these steps:

  1. Insert a new Attachment at each end of the conveyor and rename them AttStart and AttEnd respectively. Objects on the conveyor will move in a linear direction from start to end.

Make sure that the attachments are centered along each end of the part, such that an imaginary line between them would align with the intended direction.

Attachments aligned
Attachments misaligned
  1. Add a new articles/instance attributes|Attribute to the conveyor part named ConveyorSpeed of the type number and set its initial value to 2.
  1. Add a new Script to the conveyor part and paste in the following code.
  1. When tested, objects will now move in the intended direction even if the conveyor part is rotated.
Tags:
  • conveyor
  • belt
  • factory