FilterStringAsync() doesn't filter message

Hello! So I’m trying to make chatlogs but the only problem is, that I can’t filter the message. I don’t really want my Admins to see curse words in the chatlogs. I can’t really filter the text for some reason.
It’s still not filtered and the stringValue had the curse word in it, it didn’t get tagged. Thank you!

		--Save their message first
		local Chat = game:GetService("Chat")
		local ReplicatedStorage = game:GetService("ReplicatedStorage")
		local ChatStorage = ReplicatedStorage.ChatStorage
		--Filter the message and add it to ChatStorage
		local filteredMessage = Chat:FilterStringAsync(tostring(msg), plr, plr)
		--Now create a new instance
		local message = Instance.new("StringValue", ChatStorage)
		message.Name = tostring(plr.Name)
		message.Value = tostring(filteredMessage)
1 Like

Are you testing in studio? Roblox won’t filter if you are in studio. Test in a real game.

By the way doing tostring(msg) is redundant. tostring(plr.Name) and tostring(filteredMessage) are all redundant because they are already strings.

6 Likes

For some reason it still doesn’t work. I tried it in a real game and it’s printing nil.
image

print(plr.Name.. " : "..message.Value)

Works fine now, I really don’t know what I did wrong, lol.

1 Like

image

1 Like