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

Roblox Repeat If Statement?

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

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