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

Roblox Repeat If Statement?

Asked by 6 years ago
Edited 6 years ago

I'm making a game.

I have created lots of code which commences when a TextButton is pressed. However, I need this code to continuously run, so long as 'game.Workspace.Brick.BrickColor = BrickColor.Red()'.

The code needs to be always checking the brick colour. If it is red, then the code is performed. If it is not red, then it keeps checking until it is. When the brick is red, the code happens ONCE. Once the brick has turned a different colour, it continues to check the brick colour. When it turns red again, the code is performed once. So on and so forth.

Is this possible?

Thanks.

1 answer

Log in to vote
0
Answered by 6 years ago

Try visiting the wiki page: http://wiki.roblox.com/index.php?title=Conditional_statement&redirect=no#Getting_started

0
Did that help? ootheboss 32 — 6y
0
What is that? RJDUDEGAMING_MOD -5 — 6y
0
Roblox wiki ootheboss 32 — 6y
Ad

Answer this question