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

How to make an Indefinite wait until a button is pressed?

I am trying to make a confirmation box (the typical box that contains some text, yes button and no button). I need to wait until the player press button yes or button no, so the code Indefinite wait until the player click a button.

Any help will be appreciated.

2 comments

0

What have you tried?

0

nothing, I mean, of course I can make a "repeat wait(1) until pressed", but I hope there a acctual code that do that

1 answer

✓ Accepted answer

You can bind the wait() to an event instead of a :connect(), this will yield the thread until the event is fired like so:

Button.MouseButton1Click:wait()

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