I’m not sure if this is the right topic to post since I’m quite new to the forums.
Much games using custom chat commands now are experiencing errors, I’ve found out the problem after encoding the string. I’ve found there was \r at the end of the string player.Chatted returns.
To filter that, just simply do this:
local StringToFilter="Hello world!\r"
local FilteredString=table.concat(string.split(StringToFilter,"\r")," ")
--Example output
print("Unfiltered: '"..StringToFilter.."'")
print("Filtered: '"..FilteredString.."'")
(The issue has been resolved, the chat module filters illegal characters such as these now, plus the chat module has been deprecated for a better version. You also shouldn’t use Player.Chatted either.)