Help with making a textbox script work

TextBox.InputChanged:Connect(function()
	if TextBox.Text >= 10 then
		TextBox.Text = 0 
	end
end)

Well I don’t know the specific issue all I know is that for some reason it does not work.

TextBox:GetPropertyChangedSignal("Text"):Connect(function()
-- code here
end)

Research before making a post. (Also use tonumber() on the strings that are numbers to avoid any more errors.)

oh. So I put in my code and it still does not work.

TextBox:GetPropertyChangedSignal("Text"):Connect(function()
	if TextBox.Text >= 10 then
		TextBox.Text = 1
	end
end)
TextBox:GetPropertyChangedSignal("Text"):Connect(function()
	if tonumber(TextBox.Text) >= 10 then
		TextBox.Text = tostring(1)
	end
end)

I said use tonumber and tostring.

oh didn’t see that. Thanks. I appreciate it.