I made a calculator Gui simply out of boredom, but for some reason the Answer value doesn't pop up. The printing part works, to say the least.
script.Parent.MouseButton1Down:connect(function()
local Method = script.Parent.Parent.Method.Text
local Num1 = script.Parent.Parent.Num1.Text
local Num2 = script.Parent.Parent.Num2.Text
local Answer = script.Parent.Parent.Answer.Text
if Method == "+" then
Answer = Num1+Num2
elseif Method == "-" then
Answer = Num1-Num2
elseif Method == "*" then
Answer = Num1*Num2
elseif Method == "/" then
Answer = Num1/Num2
elseif Method == "%" then
local Percentage = (10^-2) * Num1
Answer = Percentage * Num2
elseif Method == "<" then
Answer = Num1<Num2
elseif Method == ">" then
Answer = Num1>Num2
elseif Method == "=" then
Answer = Num1==Num2
elseif Method == "^" then
Answer = Num1^Num2
else
print("The input method is unsupported")
end
end)

1 comment
I tested out the improved script you made and it worked. Thanks a bunch!