I made another post but that one just became totally irrelevant because I’ve boiled the problem down much more since then.
TextBox.FocusLost:Connect(function(enterPressed)
if enterPressed then
print("String"..TextBox.Text)--This right here would show you the issue if you wanted to test it out. It will print String on one line, then TextBox.Text on the next.
SendChat(TextBox.Text)
else
EndChat()
end
end)
--Now what's really weird to me is even when using gsub I can't get this new line to stop happening.
local TextReplace = string.gsub(TextBox.Text, "\n", "")
print("String"..TextReplace)
--This will still print 2 lines instead of 1.
It seems attaching a textbox’s text value to the and of another string consistently creates a new line and nothing seems to stop this behavior.
Example Image: