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

Can someone help me with Rounds?

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.

1 answer

✓ Accepted answer

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
	

2 comments

0

What do you mean by "Break the for loop" would I just use :Break() or something?

0

Updated.

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