I am working on a game which works on finding some things and answering questions like Baldi basics roblox version..where you find books and solve math questions by writing right answers in text box..any way to do it?
When you press the Enter key it gets the text in the input and transforms it in a number. If it isn't the number, the answer is wrong. If it is a number, check if it is equal with the result. if it is, the answer is right. If it isn't, the answer is wrong. This is what I said in a ModuleScript:
local function CheckAnswer(input, answer) local printedAnswer = tonumber(input.Text) local rightAnswer = false if printedAnswer and printedAnswer == answer then rightAnswer = true end return rightAnswer end return CheckAnswer
Closed as Not Constructive by Gey4Jesus69, plasma_node, gitrog, and alphawolvess
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?