How do I make this repeat?
01 | while ( true ) do |
02 | script.Parent.Humanoid:MoveTo(Vector 3. new(- 13 , 0.59 , 31 ) ) |
03 | wait( 3 ) |
04 | script.Parent.Humanoid:MoveTo(Vector 3. new( 23 , 0.79 , 31 ) ) |
05 | wait( 3 ) |
06 | script.Parent.Humanoid:MoveTo(Vector 3. new( 23 , 0.79 , - 6 ) ) |
07 | wait( 3 ) |
08 | script.Parent.Humanoid:MoveTo(Vector 3. new(- 13 , 0.59 , - 6 ) ) |
09 | wait( 3 ) |
10 | return |
11 | end |
I put in while (true) do but it doesn't loop any ideas?
01 | while true do |
02 | script.Parent.Humanoid:MoveTo(Vector 3. new(- 13 , 0.59 , 31 ) ) |
03 | wait( 3 ) |
04 | script.Parent.Humanoid:MoveTo(Vector 3. new( 23 , 0.79 , 31 ) ) |
05 | wait( 3 ) |
06 | script.Parent.Humanoid:MoveTo(Vector 3. new( 23 , 0.79 , - 6 ) ) |
07 | wait( 3 ) |
08 | script.Parent.Humanoid:MoveTo(Vector 3. new(- 13 , 0.59 , - 6 ) ) |
09 | wait( 3 ) |
10 |
11 | end |
There you go. Thats what a while loop looks like. And if it doesnt matter, oh well.
01 | while wait() do --Loops need a wait() |
02 | script.Parent.Humanoid:MoveTo(Vector 3. new(- 13 , 0.59 , 31 ) ) |
03 | wait( 3 ) |
04 | script.Parent.Humanoid:MoveTo(Vector 3. new( 23 , 0.79 , 31 ) ) |
05 | wait( 3 ) |
06 | script.Parent.Humanoid:MoveTo(Vector 3. new( 23 , 0.79 , - 6 ) ) |
07 | wait( 3 ) |
08 | script.Parent.Humanoid:MoveTo(Vector 3. new(- 13 , 0.59 , - 6 ) ) |
09 | wait( 3 ) |
10 | end |