Hey, i have a long script and it feels tedious, i feel like it could be simplified to a standard that meets everyones expectations, here's the script
while true do -- Step 1 script.Parent.Piston1.Position = script.Parent.Piston1.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston1.Position = script.Parent.Piston1.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston2.Position = script.Parent.Piston2.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston2.Position = script.Parent.Piston2.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston3.Position = script.Parent.Piston3.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston3.Position = script.Parent.Piston3.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston4.Position = script.Parent.Piston4.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston4.Position = script.Parent.Piston4.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston5.Position = script.Parent.Piston5.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston5.Position = script.Parent.Piston5.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston6.Position = script.Parent.Piston6.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston6.Position = script.Parent.Piston6.Position - Vector3.new(0, 0.125, 0) wait() script.Parent.Piston1.Position = script.Parent.Piston1.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston1.Position = script.Parent.Piston1.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston2.Position = script.Parent.Piston2.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston2.Position = script.Parent.Piston2.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston3.Position = script.Parent.Piston3.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston3.Position = script.Parent.Piston3.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston4.Position = script.Parent.Piston4.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston4.Position = script.Parent.Piston4.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston5.Position = script.Parent.Piston5.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston5.Position = script.Parent.Piston5.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston6.Position = script.Parent.Piston6.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston6.Position = script.Parent.Piston6.Position - Vector3.new(0, 0.125, 0) wait() script.Parent.Piston1.Position = script.Parent.Piston1.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston1.Position = script.Parent.Piston1.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston2.Position = script.Parent.Piston2.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston2.Position = script.Parent.Piston2.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston3.Position = script.Parent.Piston3.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston3.Position = script.Parent.Piston3.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston4.Position = script.Parent.Piston4.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston4.Position = script.Parent.Piston4.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston5.Position = script.Parent.Piston5.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston5.Position = script.Parent.Piston5.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston6.Position = script.Parent.Piston6.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston6.Position = script.Parent.Piston6.Position - Vector3.new(0, 0.125, 0) wait() script.Parent.Piston1.Position = script.Parent.Piston1.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston1.Position = script.Parent.Piston1.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston2.Position = script.Parent.Piston2.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston2.Position = script.Parent.Piston2.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston3.Position = script.Parent.Piston3.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston3.Position = script.Parent.Piston3.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston4.Position = script.Parent.Piston4.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston4.Position = script.Parent.Piston4.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston5.Position = script.Parent.Piston5.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston5.Position = script.Parent.Piston5.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston6.Position = script.Parent.Piston6.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston6.Position = script.Parent.Piston6.Position - Vector3.new(0, 0.125, 0) wait() -- Step 2 script.Parent.Piston1.Position = script.Parent.Piston1.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston1.Position = script.Parent.Piston1.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston2.Position = script.Parent.Piston2.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston2.Position = script.Parent.Piston2.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston3.Position = script.Parent.Piston3.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston3.Position = script.Parent.Piston3.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston4.Position = script.Parent.Piston4.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston4.Position = script.Parent.Piston4.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston5.Position = script.Parent.Piston5.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston5.Position = script.Parent.Piston5.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston6.Position = script.Parent.Piston6.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston6.Position = script.Parent.Piston6.Position + Vector3.new(0, 0.125, 0) wait() script.Parent.Piston1.Position = script.Parent.Piston1.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston1.Position = script.Parent.Piston1.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston2.Position = script.Parent.Piston2.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston2.Position = script.Parent.Piston2.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston3.Position = script.Parent.Piston3.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston3.Position = script.Parent.Piston3.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston4.Position = script.Parent.Piston4.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston4.Position = script.Parent.Piston4.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston5.Position = script.Parent.Piston5.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston5.Position = script.Parent.Piston5.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston6.Position = script.Parent.Piston6.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston6.Position = script.Parent.Piston6.Position + Vector3.new(0, 0.125, 0) wait() script.Parent.Piston1.Position = script.Parent.Piston1.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston1.Position = script.Parent.Piston1.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston2.Position = script.Parent.Piston2.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston2.Position = script.Parent.Piston2.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston3.Position = script.Parent.Piston3.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston3.Position = script.Parent.Piston3.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston4.Position = script.Parent.Piston4.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston4.Position = script.Parent.Piston4.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston5.Position = script.Parent.Piston5.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston5.Position = script.Parent.Piston5.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston6.Position = script.Parent.Piston6.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston6.Position = script.Parent.Piston6.Position + Vector3.new(0, 0.125, 0) wait() script.Parent.Piston1.Position = script.Parent.Piston1.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston1.Position = script.Parent.Piston1.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston2.Position = script.Parent.Piston2.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston2.Position = script.Parent.Piston2.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston3.Position = script.Parent.Piston3.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston3.Position = script.Parent.Piston3.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston4.Position = script.Parent.Piston4.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston4.Position = script.Parent.Piston4.Position + Vector3.new(0, 0.125, 0) script.Parent.Piston5.Position = script.Parent.Piston5.Position - Vector3.new(0.125, 0, 0) script.Parent.Piston5.Position = script.Parent.Piston5.Position - Vector3.new(0, 0.125, 0) script.Parent.Piston6.Position = script.Parent.Piston6.Position + Vector3.new(0.125, 0, 0) script.Parent.Piston6.Position = script.Parent.Piston6.Position + Vector3.new(0, 0.125, 0) wait() end
thank you for helping
This code should help
function repeatThis() script.Parent.Piston1.Position = script.Parent.Piston1.Position - Vector3.new(0.125, 0, 0) wait() script.Parent.Piston1.Position = script.Parent.Piston1.Position + Vector3.new(0, 0.125, 0) end while true do repeatThis() wait() end