majoko1
|
  |
| Joined: 31 Jan 2009 |
| Total Posts: 22799 |
|
|
| 21 Feb 2015 06:21 PM |
For some reason the stuff after the embedded loop won't run inside of the main loop. It's really strange and I can't figure it out.
--------------------------------------------------------
part = script.Parent
while 1 == 1 do
i = 0
while i ~= 13 do wait(.25) part.CFrame = part.CFrame * CFrame.new(-1,0,0) i = i + 1 end
wait(.25)
part.Cframe = part.CFrame * CFrame.new(14,0,0) wait(3)
end |
|
|
| Report Abuse |
|
|
cosmo9512
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 1407 |
|
|
| 21 Feb 2015 06:25 PM |
| i don't think a loop can run inside another loop |
|
|
| Report Abuse |
|
|
majoko1
|
  |
| Joined: 31 Jan 2009 |
| Total Posts: 22799 |
|
|
| 21 Feb 2015 06:26 PM |
| wow really? That's strange. I'm so used to C++ that I guess I just didnt realize |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2015 06:29 PM |
| Yes loops can run in loops. |
|
|
| Report Abuse |
|
|
majoko1
|
  |
| Joined: 31 Jan 2009 |
| Total Posts: 22799 |
|
|
| 21 Feb 2015 10:28 PM |
| Okay then what might be the problem? |
|
|
| Report Abuse |
|
|
SurKipper
|
  |
| Joined: 25 Dec 2011 |
| Total Posts: 435 |
|
|
| 21 Feb 2015 11:07 PM |
Do you want the to keep looping from the same spot? Because if so, I have a script that works for that.
part = script.Parent
while 1 == 1 do
i = 0
while i ~= 13 do wait(.25) part.CFrame = part.CFrame * CFrame.new(-1,0,0) i = i + 1 end
wait(.25)
part.Position = Vector3.new(Put the parts position into here) wait(3)
end |
|
|
| Report Abuse |
|
|