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

How do I make the frame visible after entering the correct password?

Asked by 4 years ago

I created a script that checks text in TextBox. I also created a script that allows you to close a window.

First script:

01local textBox = script.Parent
02 
03 
04 
05 
06local secretWord = "roblox"
07local colorNormal = Color3.new(1, 1, 1) -- white
08local colorWrong = Color3.new(1, 0, 0) -- red
09local colorCorrect = Color3.new(0, 1, 0) -- green
10 
11-- Initialize the state of the textBox
12textBox.ClearTextOnFocus = true
13textBox.Text = ""
14textBox.Font = Enum.Font.Code
15textBox.PlaceholderText = "Put here your word!"
View all 42 lines...

and the shorter second one

1script.Parent.MouseButton1Click:Connect(function()
2    script.Parent.Parent.Visible = false
3end)

These two scripts are local scripts. I want the window to pop up after typing the correct phrase.

How do I make the frame visible after entering the correct password?

1 answer

Log in to vote
0
Answered by 4 years ago

Ok so, make a ScreenGui, Frame , TextBox and a TextButton, then put a script into the TextButton, and put this code:

Make sure the "Deprecated Objects Shown" by pressing alt+s then search "Deprecated Objects Shown" then check it.

1local password = "Password"
2script.Parent.MouseButton1Click:Connect(function()
3    if
4        script.Parent.Parent.PasswordBox.Text == password
5    then
6        script.Parent.Parent.Frame.Visible = true
7    end
8 
9end)
0
the script doesn't work KotyOceloty 25 — 4y
0
Show me your explorer so i can see it WesleyAng_3 153 — 4y
0
You have in film KotyOceloty 25 — 4y
Ad

Answer this question