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

Im trying to make like a search textbox but it keeps printing false why?

local searchtext = string.lower(script.Parent.Search.Text)
while wait(0.1) do
	if string.find(searchtext,"go") then
		print('true')
	else
		print('false')
	end
	end

Im trying to do when someone types in the word go in the textbox it should print true but it doesnt print true, it keeps printing false even though the word go is in the text box. Why though?

1 answer

If you have no errors then the script is doing what it is asked I believe you are referencing the startergui (I could be wrong).

local searchtext = string.lower(game.Players.LocalPlayer.[SCREENGUI].[FRAME].Search.Text)
	while wait(0.1) do
	    if string.find(searchtext,"go") then
	        print('true')
	    else
	        print('false')
	    end
	    end

Replace everything in [] with the related fields

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