How do i continue the for i=1,6 while moving on to the next jumpart? the script is suppose to raise each block that is named jumpart in workspace and bring them down its going to do that 6 times continuously while raising another block what it does right now is it waits for 1 block to finish its 6th turn then it goes to the next one. Thanks for taking your time to read this post.
enabled=true children=game.Workspace:GetChildren() function onClicked() if enabled==true then enabled=false script.Parent.BrickColor=BrickColor.new("Really red") for i,jumpart in pairs(children)do if jumpart.Name=="jumpart" then for i=1,6 do for i=4,13,0.3 do jumpart.CFrame=CFrame.new(jumpart.Position.x,jumpart.Position.y+1.1,jumpart.Position.z) wait(0.1) end wait(1) for i=13,4,-0.3 do jumpart.CFrame=CFrame.new(jumpart.Position.x,jumpart.Position.y-1.1,jumpart.Position.z) wait(0.1) end end end if i==34 then wait(1) script.Parent.BrickColor=BrickColor.new("Lime green") enabled=true end end end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
I don't quite understand what you are expecting the script to do but I am going to attempt to rewrite your script. I set this up so that it moves all of the parts up and down at the same time. If this is not what you need I can change it to do what you need.
I followed what your script said so if something is wrong it must be what you wrote.
enabled = true function onClicked() if enabled == true then enabled = false script.Parent.BrickColor = BrickColor.new("Really red") for x = 1, 6 do for z = 1, 27 do for i, v in pairs(game.Workspace:GetChildren()) do if v.Name == "jumpart" then v.CFrame = Cframe.new(v.Position.X, v.Position.Y + 1.1, v.Position.Z) wait() end end end wait(1) for z = 1, 27 do for i, v in pairs(game.Workspace:GetChildren()) do if v.Name == "jumpart" then v.CFrame = Cframe.new(v.Position.X, v.Position.Y - 1.1, v.Position.Z) wait() end end end wait(1) script.Parent.BrickColor = BrickColor.new("Lime green") enabled = true end end end script.Parent.ClickDetector.MouseClick:connect(onClicked)