basically, i have a table of very simple math problems: local EasyProblems = {17+10, 20+13, 40-21, 20-7, 14+12, 18+2, 21-3, 14-8, 15+6, 9+10, 7+7, 14+3, 14+8, 19-3, 14-2, 10-10, 0-7, 7+9, 17-8, 17-13}
and with this: local RandomEasyProblem = EasyProblems[math.random(1, 19)]
it can choose the answer to a random problem. however, i want the problem to appear in a TextLabel and then the player would have to type the answer to the chosen problem in a TextBox, or the answer is a local
variable.
CODE:
local Main = script.Parent
local Frame = Main:WaitForChild("Frame")
local Text = Frame:WaitForChild("TextLabel")
local EasyProblems = {17+10, 20+13, 40-21, 20-7, 14+12, 18+2, 21-3, 14-8, 15+6, 9+10, 7+7, 14+3, 14+8, 19-3, 14-2, 10-10, 0-7, 7+9, 17-8, 17-13}
local EasyAnswers
local RandomEasyProblem = EasyProblems[math.random(1, 19)]
print(RandomEasyProblem)
Text.Text = RandomEasyProblem