07-31-2011, 11:59 PM
Try this.
[lua]
function waitFor(time)
local oldtime = os.time()
while true do
sleep(0.01)
if os.time() - oldtime >= time then
break end end
end
while true do
newboxo = create("Box")
newboxo.Name = "newboxo"
newboxo.Size = Vec2D(3,3)
newboxo.Parent = game.World
newboxo.Position = script.Parent.Position
newboxo.Fixed = false
waitFor(2)
newboxo:remove()
end
[/lua]
As it says, sleep() for long periods will be disabled tommorrow.
[lua]
function waitFor(time)
local oldtime = os.time()
while true do
sleep(0.01)
if os.time() - oldtime >= time then
break end end
end
while true do
newboxo = create("Box")
newboxo.Name = "newboxo"
newboxo.Size = Vec2D(3,3)
newboxo.Parent = game.World
newboxo.Position = script.Parent.Position
newboxo.Fixed = false
waitFor(2)
newboxo:remove()
end
[/lua]
As it says, sleep() for long periods will be disabled tommorrow.