How do I make an if then else statement check something only once?

Well it’s difficult to say exactly why that could be, my guess would be that this in statement:

if userDot1 == patternDot1 and alreadyChecked == false then userSelectCorrect1 = true end

the userDot1 == patternDot1 part is returning false, and the alreadyChecked == false part is returning true. Because both statements are not returning true, the userSelectCorrect1 = true is not triggered. Then, because alreadyChecked gets set to false, the next time you reach this function even if userDot1 == patternDot1 is true, the second clause is false so userSelectCorrect1 will never get set to true.

Try moving the alreadyChecked = true line up into the if statement like so:

if userDot1 == patternDot1 and alreadyChecked == false then userSelectCorrect1 = true alreadyChecked = true end

I did that… I even did this:

if userDot1 == patternDot1 and not alreadyChecked then userSelectCorrect1 = true alreadyChecked = true else alreadyChecked = true end --even though I had put this before: --but it didn't run alreadyChecked = true

Which, actually, is quite inconvenient because I don’t want to be making elses when I don’t really need it.

What it prints out when I press the second dot and the computer selected the second dot different from the first dot is:

--in the print statement I changed it a bit to show alreadyChecked 1st dot user selected is true and alreadyChecked is true  1st dot user selected is false and alreadyChecked is true  2nd dot user selected is true