I'm trying to make this loop;
repeat
wait(.1)
print(check)
if check == 1 then
W = 0
break
end
until wait(W) or check == 1 or L == 1
(W, check, and L are all defined somewhere in my script beforehand, and W = 3 btw), and I was trying to make it repeat that code, UNTIL 3 seconds had passed, or check or L = 1. I then found out it repeats 1 time, then finishes after 3 seconds. So I then tried a while loop as while wait(W) do, thinking it would wait that time and run the code below until the time had passed, but it has the same issue as the repeat loop. Also the loop wont break if it only reads once. If anyone knows a way to have this loop last a period of time, comment or answer something if you wish. Thanks.

1 comment
Yeah I was trying to do coroutines lol, this works, thanks.