Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Whats the more efficient way of having 100's of conveyors?

Making a cart game, going to have many many conveyors with multiple speeds.

Would it be better this way in each conveyor block,

while wait(0.1) do
	script.Parent.Velocity = script.Parent.CFrame.lookVector * script.Parent.Speed.Value
end

Or do something like

while wait(0.1) do
	for i,v in pairs(workspace.Conveyors:GetChildren()) do
		if v.Name == "slowConveyor" then
			v.Velocity = v.CFrame.lookVector * 16
		elseif v.Name == "mediumConveyor" then
			v.Velocity = v.CFrame.lookvector * 30
		end
	end
end

The second one was just coded here, so if there's any errors I apologize.

10 comments

0

If you want different speeds, I’d use the second one.

0

Remove the while loop.

0

Remove the while loop.

0

Remove the while loop.

0

Remove the while loop.

0

I'd use the second one

0

Remove the while loop.

0

Remove the while loop.

0

Remove the while loop.

0

Remove the while loop.

1 answer

There is a property inside a part which allows you to make conveyors without the use of code. It's called Velocity and when applied will move the part in the suggested location (X,Y,Z Coordinates.) Though if the value is too low it wont work for objects which weight to much and take up a large mass.

This discussion is preserved as it was. New answers, comments, and votes are closed.