I want to make a cable car that goes up and down only on cylinders that are going only on one direction. Do I need to remake it so it can turn or is it possible to make the multiple cylinders' velocity change with only one script?
You can use a generic for loop
which literates or loops over a table, so you can use :GetChildren()
to get the cylinders as it returns a table or a array.
local parts = workspace.cylinders:GetChildren() -- define where all the cylinders are for _,v in pairs(parts) do v.Velocity = script.Parent.CFrame.LookVector * 100 --example print(v.Name) end