player.Chatted Acting Weird in studio

A few developers on my team have mentioned that the player.Chatted event is not acting as expected.

Description

The message parameter is not passing the correct string.

game.Players.PlayerAdded:Connect(function (player)
	player.Chatted:Connect(function (msg)
		print(msg == "hi")
	end)
end)

When a player in game says “hi” this code should print true, however, its printing false.

I have also tried

if msg == "hi" then
	print("is hi")
end

However, because the expression is false, it wont print.

Where

This is happening in all places where scripts use the .Chatted event. Multiple places have reported this problem. From my tests, this is only happening in studio.

4 Likes

Have you printed out the message itself? Perhaps Roblox appends the username?

This actually isn’t related to Player.Chatted at all, it’s this bug that recently popped up.

2 Likes

The message looks like it prints as expected. If I print msg, it prints “hi”.