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 frame visible when a string is entered?

Okay so how do I make it so when a string is put in a TextBox, it makes frame visible (and no matter what the capitalization is like)?

1 answer

I haven't really worked with textboxes, but I assume it would look something like this:

function show()
	if string.lower(textbox.Text) == string.lower("StRIng") then
		Frame.Visible = true
	end
end

textbox.Changed:connect(show)

EDIT: To make the other frames not visible, loop through (with a check that it isn't the frame you just make visible) and hide them.

function show()
	if string.lower(textbox.Text) == string.lower("StRIng") then
			for i, v in pairs(Frame.Parent:GetChildren()) do
				if v.Name ~= "Frame" and v:IsA("Frame") then -- Or whatever your frame is called.
					v.Visible = false
				end
			end
		Frame.Visible = true
	end
end

textbox.Changed:connect(show)

1 comment

0

Okay so now how do I make any other frames in that folder not visible.

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