If statement not working correctly?
Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
01 | local b = script.Parent |
02 | local guess = b.Parent.Guess |
03 | local nums = { "1" , "2" , "3" , "4" , "5" , "6" , "7" , "8" , "9" , "10" } |
04 | local plr = b.Parent.Parent.Parent.Parent |
05 | local newNum = nums [ math.random( 1 , #nums) ] |
07 | local submitted = false |
10 | b.MouseButton 1 Click:connect( function () |
12 | if guess.Text = = newNum then |
13 | b.Parent [ "Yes/No" ] .Text = "Correct!" |
14 | plr.Guesses.Value = plr.Guesses.Value + val |
16 | b.Parent [ "Yes/No" ] .Text = "Incorrect!" |
17 | plr.Fails.Value = plr.Fails.Value + val |
21 | if submitted = = true then |
28 | newNum = nums [ math.random( 1 , #nums) ] |
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.