local message = "Go away" local message = game:GetService("TextService"):FilterStringAsync(msg,plr.UserId) print(message) ---------------------------- --My old method 1000000b+ times better than this local message = "Go away" local message = game:GetService("Chat"):FilterStringForBroadcast(msg,plr) print(message)
Don't know how to use it also i don't understand why they want to make extra things for localscripts when they already have it
This should work, it seems you forgot to GetChatForUserAsync(userId)
. Weird, but necessary step.
LocalScript
local messageToFilter = "yourself" local player = game.Players.LocalPlayer local textService = game:GetService("TextService") function filterMessage(message) local filteredItem = textService:FilterStringAsync(message, player.userId) return filteredItem:GetChatForUserAsync(player.userId) -- The thing you missed end print(filterMessage(messageToFilter))