Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Do while true do loops run on bindtoclose? still

Asked by 4 years ago

for example

lets say theres a loop

while wait() do 


print('G')

end


game:BindToClose(function()

wait(30)

end)

would this run?

1 answer

Log in to vote
0
Answered by 4 years ago

The loop will run. Line 9 with the BindToClose() call is unreachable code because of the infinite loop, so you are not binding anything to close.

Ad

Answer this question