Still have questions? Join our Discord server and get real time help.
0

# help with making loop active while the rest of the script is still going?

so, its like this

while true do -- this loop is still active when ("ThisIsATest is still active")  is printed
wait()
print("ThisIsATest")
end

print("ThisIsATest is still active")


1

try doing spawn(function() or coroutine.wrap(function(), then put the loop inside. Do it like this:

spawn(function()
while true do
wait(1)
print("ThisIsATest")
end
end)

print("ThisIsATest is still active")


I added 1 to wait() so it will prevent too much stuff that you can't see the other print. You can also do the coroutine method:

coroutine.wrap(function()
while true do
wait(1)
print("ThisIsATest")
end
end)

print("ThisIsATest is still active")


Hope this helps!

0
tysm GameStealerKid 38 — 8d