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

Ignore a wait function?

i have a function that uses wait in a for loop, problem is is when i run the function before the other piece of code it waits to complete the function before going to the next line

any way to make it work in the background without it interfering with the other piece of code?

1 answer

✓ Accepted answer

Multi-thread

--[[Spawn(function)
OR
coroutine.wrap(function)()]]--

spawn(function()
--code1
end)

--code2

---------------------------------------
coroutine.wrap(function()
--code1
end)()

--code2

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