Realized today that you need to manually censor textbox text using code and I’ve read and reread the documentation a couple times and this code still will not work:
What am I doing wrong? I heard you cant test in studio but even if I join a real server it wont work.
local TitleName = Player:WaitForChild("TierListTitle")
local filteredTextResult
local success, errorMessage = pcall(function()
filteredTextResult = TextService:FilterStringAsync(Text, Player.UserId)
end)
if not success then
warn("Error filtering text:", Text, ":", errorMessage)
-- Put code here to handle filter failure
end
if success then
TitleName.Value = Text
end
Looking at your code it seems like you set the original text as the title name instead of the censored one. Try changing TitleName.Value = Text into TitleName.Value = filteredTextResult.
local TitleName = Player:WaitForChild("TierListTitle")
local filteredTextResult
local success, errorMessage = pcall(function()
filteredTextResult = TextService:FilterStringAsync(Text, Player.UserId)
end)
local Newtext = filteredTextResult:GetNonChatStringForBroadcastAsync()
if not success then
warn("Error filtering text:", Text, ":", errorMessage)
-- Put code here to handle filter failure
end
if success then
TitleName.Value = Newtext
end