Why is :GetnonChatStringforUserAsync not censoring

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

image

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

The filter doesn’t work in studio

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.