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