[SOLVED] How do I check for the correct answer to an equation?
Asked by
5 years ago Edited 5 years ago
Hi, I'm making a script where the player gets 2 random values at the top of the screen, and has to do addition to find the correct answer. I've set up the value part but I've noticed that the script doesnt recognize the correct answers. I expected it to work by doing something like if T.Text == sum then
but that doesn't seem to be working. How do I fix this?
01 | local T = script.Parent |
02 | local Question 1 = (math.random( 1 , 10 )) |
03 | local Q 1 = script.Parent.Parent.QuestionBox 1 |
08 | local Question 2 = (math.random( 1 , 10 )) |
09 | local Q 2 = script.Parent.Parent.QuestionBox 2 |
15 | T.FocusLost:Connect( function (enterPressed) |