I am trying to figure out how to loop a group of lines. Help?

while true do

(code here)
end

Thanks. Im assuming if i use wait(integar) it would make a wait between looping? yes?

That is correct, wait() is the smallest you can do, it is not recommended as it is poorly optimized and can cause crashes or bugs

Depends on what ur programming, u can use different methods for looping code such as while wait do

well if you want full optimization do

while wait do
wait()
end
end

Certainly! To loop a group of lines, you can use a programming construct called a loop. There are different types of loops available in different programming languages, but I'll explain the concept using a common loop called a "for loop".

Here's a general framework of a for loop:

```python
for i in range(n):
# Group of lines to be looped
# You can write your code here
```

Let's break it down:

1. `range(n)` generates a sequence of numbers starting from 0 and ending at n-1. This sequence determines how many times the loop will iterate. For example, `range(5)` will produce the sequence [0, 1, 2, 3, 4].

2. `for i in range(n):` is the loop statement that initiates the loop and assigns each value from the generated sequence to the variable `i` in each iteration.

3. The lines to be looped are indented under the loop statement. You can write your group of lines between the indentation.

To demonstrate, let me provide an example in Python:

```python
for i in range(3):
print("Iteration", i)
print("This is line 1 in iteration", i)
print("This is line 2 in iteration", i)
print() # Empty print to add some separation
```

Output:
```
Iteration 0
This is line 1 in iteration 0
This is line 2 in iteration 0

Iteration 1
This is line 1 in iteration 1
This is line 2 in iteration 1

Iteration 2
This is line 1 in iteration 2
This is line 2 in iteration 2
```

In this example, the group of lines is printed three times, as `range(3)` generates values [0, 1, 2] for `i`.

So, to loop your group of lines, you would replace the comments with the actual code you want to repeat, and adjust the range according to how many times you want the loop to execute.