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

How to make a code run only WHILE a bool value is on true?

Asked by 5 years ago

So if the bool value turns off again the code will not execute.

0
while bool == true do greatneil80 2647 — 5y
0
if bool == true do print('running') else print('not running') end greatneil80 2647 — 5y
0
OMG U ARE A LEGEND Y DIDNT I THINK OF THAT LordOfWatermelons 27 — 5y
0
Lol, its as simple as that mixgingengerina10 223 — 5y

1 answer

Log in to vote
0
Answered by
B_rnz 171
5 years ago
Edited 5 years ago

It's pretty simple. You would just use Bool value = true/ false. When it's executed, use the IF statement.

if Example.Value then
     -- Fire whatever you have. I wouldn't recommend using while true do though.
end
Ad

Answer this question