Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a GUI close after imputing the text?

So basically I have a GUi and a text box. I figured that a text box changes text if someone types something into it. So basically I want it to detect if it changes into this text but I don't know how to do it. So I made a script. I think it doesn't work because it is too simple.

local player = game.Players.LocalPlayer
local code = "hi" ---------Hi its me I so basically this is suppose to be what is typed in the textbox to remove the gui
if script.Parent.Text == code
then
	print("Code detected")
	script.Parent.Parent.Visible = false --------------The Frame of the GUI
end

1 answer

It's a basic "Changed" function

local code = "Text Here"

script.Parent.Changed:Connect(funtion() 
    if script.Parent.Text == code then
        script.Parent.Parent.Visible = false
    end
end) 

That's all it is

This discussion is preserved as it was. New answers, comments, and votes are closed.