Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Which is the best way to go about making a secondary loop?

Secondary loop as in a loop that runs along the main script

Option 1

coroutine.resume(coroutine.create(function() while true do wait(1) print(tick()) end end))

Option 2

Spawn(function() while true do wait(1) print(tick() end end)

Option 3

delay(0, function() while true do wait(1) print(tick()) end end)

Soo which is the most efficient?

1 answer

As long as it works, I don't think it matters. For instance,

print('Hello World')

or

print("Hello World")

ex 2)

while true do
wait()
end
--or
while wait(.644444444444) do
end

If the method interferes with the main script, why use it? It's logic.

What i'm trying to say...

They're ALL efficient if they all work.

1 comment

0

Ummm. No. That's like saying that there's no need to use quicksort because bubble sort works.

This discussion is preserved as it was. New answers, comments, and votes are closed.