local b = script.Parent local guess = b.Parent.Guess local nums = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"} local plr = b.Parent.Parent.Parent.Parent local newNum = nums[math.random(1, #nums)] local round = 1 local submitted = false local val = 1 b.MouseButton1Click:connect(function() submitted = true if guess.Text == newNum then b.Parent["Yes/No"].Text = "Correct!" plr.Guesses.Value = plr.Guesses.Value + val else b.Parent["Yes/No"].Text = "Incorrect!" plr.Fails.Value = plr.Fails.Value + val end end) if submitted == true then val = 0 end while true do wait(15) round = round + 1 newNum = nums[math.random(1, #nums)] print(newNum) val = 1 end
All of that works but if I try and stop the changing of the values if the submitted is true it doesn't work. Help?
So I want to, basically, after they click once they can't click again, but when a new round starts, they can.