Making a Conveyor Belt
Conveyor belts are objects that move other objects on top of them. While real conveyor belts are made of many parts, a conveyor in Roblox can be made simply with one part.
To make a conveyor, first insert a new Part. Use the Scale tool to make the part the size you want for your conveyor. Use the Surface tool to make the top of the part Smooth.
To make parts move across the top of the conveyor, we will need to change its Velocity property. For unanchored parts, setting the velocity will make the part move. For anchored parts, setting the velocity will make anything that touches the part move instead.
Before we set the velocity though, we need to know which direction we want parts on the conveyor to move. Roblox uses an X, Y, Z coordinate system for positions and velocities of parts in a game. If you have looked at the properties of a part, you may have noticed that the Position property will change if you move the part around the world. Moving parts horizontally will move them either in the X or Z direction, while moving a part up and down moves it in the Y. To help visualize this, click on the View tab and click on the Show Grid button.
You'll notice that the game now shows a 4 stud grid overlayed on the baseplate. It will also show 3 arrows at the center of the baseplate. These arrows represent the 3 different axes in the game: red represents X, green represents Y, and blue represents Z.
Move your part near the arrows so we can figure out what direction we need to set the velocity.
Notice how this part is aligned along the blue arrow which corresponds to the Z axis. The arrow points towards positive Z values, so if we wanted to make a part on the conveyor move along the arrow, we would need to apply a positive Z velocity. If instead we wanted a part to move opposite of the arrow, we would need to apply a negative Z velocity. For this tutorial, we will use a positive Z velocity. To do this, click on the View tab and then click on the Properties button to open the Properties window. Select the part and find the Velocity property. Click the arrow next to Velocity so we can change the values one at a time, and set the Z value to 20.
Now if we press Play and step on the part, the character will be moved along the conveyor!
- If you want a conveyor to move parts diagonally, you will have to apply velocity in both X and Z.
- Setting the Y velocity on a conveyor will fling parts and players up when they touch it. You can use this to make springboards and trampolines.