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

How do I check if a TextBox's Text changes ?

so I'm trying to make an answer game and i decided to use

TextBox = game.StarterGui.ScreenGui.TextBox

and I did

TextBox.Text.Changed:Connect(function()
if TextBox.Text == 'Noob' then print('got it rigt') but it keeps on erring any one know why?

end

1 answer

✓ Accepted answer

Check if the text was changed on it then check if the text is "Noob"

local TextBox = script.Parent.TextBox

TextBox.Changed:Connect(function(Property) -- Whenever Any property is changed on TextBox
	if Property == "Text" then -- Checks if the property was the Text
		if TextBox.Text == "Noob" then -- Checks if the text is "Noob"
			print("Got It Right") -- Prints
		end
	end
end)

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