So I need help I have a script that perfectly works but ITS TOO LONG! Any way to make it short?
Here:
FloodWater = game.Workspace.FloodWater FloodWater.CFrame = FloodWater.CFrame + Vector3.new(0,2,0) wait(0.2) FloodWater.CFrame = FloodWater.CFrame + Vector3.new(0,2,0) wait(0.2) FloodWater.CFrame = FloodWater.CFrame + Vector3.new(0,2,0) wait(0.2) FloodWater.CFrame = FloodWater.CFrame + Vector3.new(0,2,0) wait(0.2) FloodWater.CFrame = FloodWater.CFrame + Vector3.new(0,2,0) wait(0.2) FloodWater.CFrame = FloodWater.CFrame + Vector3.new(0,2,0) wait(0.2) FloodWater.CFrame = FloodWater.CFrame + Vector3.new(0,2,0) wait(0.2)
An easy way to do this, is to count the times "FloorWater" is CFramed on the Y-axis. In the example, you did 7, so start out like this:
for i = 1, 7 do end
In there, all you do is put in you CFrame line.
This is what it should look like:
for i = 1, 7 do FloodWater.CFrame = FloodWater.CFrame + Vector3.new(0,2,0) wait(0.2) end
That will eliminate all of those lines. On line 1, the 1 means how many times it runs in one iteration. If that 1 was 2, it would take (~)4 iterations to run. The 7 means how many times that code repeats. So if you have that "FloodWater" CFrame 2 studs every .2 seconds x number of times, x would go there (x would be a number).
Any questions, let me know!