Categories > Exploiting > Scripts >
[REQ] run a loop within a script without it getting interrupted
Posted
print("A")
while wait() do
-- idk something here
end
print("B")
basically what im trying to do is to make it print "A", run an infinite loop, and print "B"
any ways i can do this? (please dont just put print("B") in front of the loop i need a real solution)
soy pro
Replied
If I understood the question right, what you might be looking for is coroutines: https://create.roblox.com/docs/reference/engine/libraries/coroutine
Cancel
Post
https://media.discordapp.net/attachments/995070188628221952/1022545309529808996/mrk0banner5.png
Replied
basically what mrk0 said
coroutine.wrap(function()
while true do
-- ur looping code here
task.wait()
end
end)()
Cancel
Post
Did I mention I use arch btw?
Replied
Wow
It's very cool.
Cancel
Post
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post