Help with making tweens in order

So I have been making a test for a game I’ve been planning to make but I ran into one problem. If I make so many parts in my folder like 40 of them, It would take forever to make 40 variables for them.

What I am trying to do is that the model (primary) will start at the 1st object. Then will go to the 2nd, and 3rd, and 4th of the same direction of the goal parts and loops like it come backs to the 1st when its finished. Basically it goes from one another to the other one on what the value is like if the value is 1 then after the tween ends, the value gets added by 1 then goes to 2. The objects vary. This is what I wanted it to look like.

As you see, the model turns around.

Tell me a solution and I’ll respond :pray:

you can use for loops with the keyword in to loop through a table and there will be 2 variables the first one is the index and the 2nd one is the value

instance:GetChildren() returns a table of instances

local folder = script.Folder -- path to folder


for index, part :Part in folder:GetChildren() do
	-- tween the part
end
2 Likes