01 | local b = game.Workspace.Hello.Value |
02 | local h = true |
03 | h = true if b = = 10 |
04 | else h = = false |
05 |
06 |
07 |
08 | while h = = true do |
09 | wait( 40 ) |
10 | script.Parent.Text = "20" |
Yes but No you should use an if statement in a different line
and change the value of h inside the if statement and remove "h = true" outside the if statement
also, put a then after the if statement
You should also have an "end" at the end of a while loop.
You also forgot an end at the end of your if statement like so
Like this:
01 | local b = game.Workspace.Hello.Value |
02 | local h = true |
03 |
04 | if b = = 10 then |
05 | h = true |
06 | else |
07 | h = = false |
08 | end |
09 |
10 | while h = = true do |
11 | wait( 40 ) |
12 | end |
13 | script.Parent.Text = "20" |