Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a Textbox Answerslot?

Asked by 10 years ago

I am making it somewhat like a "Trivia" and they type the answer in the TextBox. But when they type the answer in the TextBox it doesn't do anything. Can someone help me with this script?

local Question = script.Parent.Question
local Answer = script.Parent.AnswerBox
local Start = script.Parent.TextButton

function onClick()
Start.Visible = false
Start.Active = false
Answer.Visible = true
Answer.Active = true
Question.Text = "What is the name of the group you are applying to?(Caps Sensitive)"
if Answer.Text == "FLASH Network" then
Question.Text = "Who is the leader of this group?(Caps Sensitive)"
if Answer.Text == "GianniFlash" then
Question.Text = "What is the main fort called?"
if Answer.Text == "Turmoil Pass" then
Question.Text = "Will you do all you can to serve FLASH Network in the best way possible?"
if Answer.Text == "Yes" then
Answer.Visible = false
Answer.Active = false
Question.Text = "Good job! You passed the test. Message a Captain+ for your promotion!"
game:GetSerivce('BadgeService'):AwardBadge(game.Players.Player.userid, 169121207)
end
end
end
end
end
Start.MouseButton1Click:connect(onClick)

1 answer

Log in to vote
0
Answered by 10 years ago

All those local's up there are only visible in the function scope. Not the rest and definately not the function caller. If this doesn't help... the local's are the only thing that I see wrong. I can't really explain scopes that well but here is a REALLY quick explanation in the roblox wiki, copy and paste it, http://wiki.roblox.com/index.php?title=Scopes

0
Can you explain the term "function scope"? GianniKun 40 — 10y
Ad

Answer this question