So I have a game that I want to implement rounds in. I can do basically everything else, I just need to know how to have the game either wait a certain amount of time (Say 120 seconds) to continue the script, or have a value be true.
Example:
There is a button that needs to be pressed, and the player must beat the obby in 120 seconds or less and hit the button. If the player hits the button, it continues with the script, if they fail to complete it in the 120 seconds, it will still continue with the script.
For loops
.
Conditions.
Break
.
All simple things.
Example:
Make a BoolValue
inside the player to determine if the button was clicked. You could easily do this, and change it true when they click it.
Then:
local breakable = false for i = 1,120 do wait(1) if breakable == true then break end for _,v in next, game.Players:GetPlayers() do if v.BoolValue.Value then breakable = true end end end