How come the textbox turns white instead of blue?
01 | local textBox = script.Parent |
03 | local secretWord = "Testing1" |
04 | local colorWrong = Color 3. new( 1 , 0 , 0 ) |
05 | local colorCorrect = Color 3. new( 0 , 1 , 0 ) |
06 | local colorNormal = Color 3. new( 42 , 84 , 126 ) |
09 | textBox.ClearTextOnFocus = false |
11 | textBox.Font = Enum.Font.Code |
12 | textBox.PlaceholderText = "" |
13 | textBox.BackgroundColor 3 = colorNormal |
17 | local function onFocused() |
18 | textBox.BackgroundColor 3 = colorNormal |
21 | local function onFocusLost(enterPressed, inputObject) |
23 | local guess = textBox.Text |
24 | if guess = = secretWord then |
25 | script.Parent.TextLabel.Visible = false |
26 | if script.Parent.Text = = "Testing1" then |
27 | script.Parent.TextLabel.Visible = true |
31 | textBox.Text = "TestRight" |
32 | textBox.BackgroundColor 3 = colorCorrect |
34 | textBox.Text = "TestWrong" |
35 | textBox.BackgroundColor 3 = colorWrong |
38 | textBox.BackgroundColor 3 = colorNormal |
42 | textBox.FocusLost:Connect(onFocusLost) |
43 | textBox.Focused:Connect(onFocused) |
How come the textbox turns white instead of blue?