local b = game.Workspace.Hello.Value local h = true h = true if b == 10 else h == false while h == true do wait(40) 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:
local b = game.Workspace.Hello.Value local h = true if b == 10 then h = true else h == false end while h == true do wait(40) end script.Parent.Text = "20"