im making an enemy editor, and to not get my game banned, i need to make sure that the names people give enemies arent against roblox rules
HOWEVER, when i try to use the functions roblox gives us to censor things, censoring does NOT happen.
ive done multiple prints and they are telling me nothing is getting censored
script:
if stat_to_change == "Name" and value then
print("Startup")
local TextService = game:GetService("TextService")
local filteredText = ""
local success, errorMessage = pcall(function()
print("stuff is happening")
local filteredTextResult:TextFilterResult = TextService:FilterStringAsync(value, plr.UserId)
filteredTextResult = filteredTextResult:GetNonChatStringForUserAsync(plr.UserId)
print("FilteredTextResult Is: "..filteredTextResult)
enemy.Name = filteredTextResult
enemy:FindFirstChild("Name").Value = filteredTextResult
enemy:FindFirstChild("HoverGUI").MainContent.Title.Text = filteredTextResult
end)
if not success then
warn("Error filtering text:", value, ":", errorMessage)
end
end
edit: im only showing the part of the script that has to do with the censorship