This is a server script inside a text label which updates the text label and spawns zombies, The script works but when I update the hello value to 11 the script keep going?
local b = game.Workspace.Hello.Value while b == 10 do wait(40) script.Parent.Text = "20" end
local b = game.Workspace.Hello.Value while b == 10 do wait(40) script.Parent.Text = "20" b = game.Workspace.Hello.Value end
You need to update b's value each time.
OR
local b = game.Workspace.Hello while b.Value == 10 do wait(40) script.Parent.Text = "20" end
OR
while game.Workspace.Hello.Value == 10 do wait(40) script.Parent.Text = "20" end
Hello! This should do it.
local b = game.Workspace.Hello while b.Value == 10 do wait(40) script.Parent.Text = "20" end
Your script kept going as you saved the value in the beginning, and the script doesn't see if you changed it or not, but this script does check.