Need a little help scripting
#8
(07-31-2011, 11:59 PM)Qwertygiy Wrote: 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.

Only in events, not everywhere.
Reply


Messages In This Thread
Need a little help scripting - by Virtualdarks - 07-31-2011, 11:47 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)