|
| 06 Feb 2014 08:00 PM |
I have a loop that calls a function, but the loop and the functions times add together, is there any way to disregard the function time during the loop?
|
|
|
| Report Abuse |
|
|
| |
|
|
| 06 Feb 2014 08:01 PM |
| Use a coroutine. Look it up on the wiki. |
|
|
| Report Abuse |
|
|
|
| 06 Feb 2014 08:02 PM |
Lava = script.Parent.Lava:getChildren()
function dropLava() i = math.random(1, #Lava) c = Lava[i]:clone() c.Parent = script.Parent.Clones c.Position = Lava[i].Position - Vector3.new(0,1.2,0) c.Anchored = false wait(1) c:destroy() end
while true do dropLava() wait(.2) end |
|
|
| Report Abuse |
|
|
|
| 06 Feb 2014 08:05 PM |
| There is a lot easier way to do what your trying to do, but I don't want to spend the time since I have already helped a ton of people. But there is an easier way to do it is helping already. |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 06 Feb 2014 08:17 PM |
function dropLava() i = math.random(1, #Lava) c = Lava[i]:clone() c.Parent = script.Parent.Clones c.Position = Lava[i].Position - Vector3.new(0,1.2,0) c.Anchored = false game.Debris:AddItem(c, 3) end
while true do dropLava() wait(.2) end |
|
|
| Report Abuse |
|
|