Why TextBox Text property don't changing?

Hello, I’m trying make TextBox, which will format text when it unfocused.

--HeightInput is a TextBox, ToolSettings[Tool]["Brush"][Property][2][3] is some dictionary variable
BrushConnections[#BrushConnections + 1] = HeightInput.FocusLost:Connect(function()
	ToolSettings[Tool]["Brush"][Property][2][3] = tonumber(HeightInput.Text)
	print("<b>" .. HeightInput.Text .. " Studs</b>")
	HeightInput.Text = "<b>" .. HeightInput.Text .. " Studs</b>"
end)

the main problem is that print("<b>" .. HeightInput.Text .. " Studs</b>") outputs everything as I want:
image
but if I look on text box itself…
image
only 3 is here, Studs and etc is missed.
Can someone tell me, why my TextBox glitched?

Hey,

I have tried to repro this issue on a textbox but it seems to work fine…

Perhaps somewhere in your script it alters the TextBox once the text gets changed? It could also have something to do with the text formatting tags however I’m not really sure about that.

1 Like

Yep, I realized this yesterday before going to sleep - I had function which formats textbox text with “%d+”