I have a command system using the player.Chatted event and just an hour or 2 ago, my commands stopped working and I debugged and found out that the message string has an invisible character added to the end of the string.
Code:
player.Chatted:Connect(function(message)
print("message", message, #message)
end)
Output:
> message ! 2
So I used HttpService:JSONEncode to figure out what the invisible character was
Code:
player.Chatted:Connect(function(message)
print("message", message, #message)
print(HttpService:JSONEncode(message))
end)
Output:
> message ! 2
> "!\r"
The weird thing is, this does not happen on studio when playing as a solo player. It happens on live servers as well as studio’s local server feature.
I thought somehow my computer was adding \r
when I press enter, but I got someone else to join and the same thing happens when he chats.
I tried testing the bug on another game and the bug still occurs.
Why is this happening?
This only started happening a few hours ago, it was working fine before then.