Been looking around and haven’t been able to find anything that helps me,
FilteredText keeps returning nil.
Events.OCName.OnServerEvent:Connect(function(player,text)
print("Worked")
local Overhead = player.Character:FindFirstChild("Head").Overhead.OC
print(text)
local filteredText = ""
local success, errorMessage = pcall(function()
local filteredTextResult = TextService:FilterStringAsync(text, player.UserId)
print(filteredTextResult)
end)
if not success then
warn("Error filtering text:", text, ":", errorMessage)
Overhead.Text = "Censored."
elseif success then
print(filteredText)
Overhead.Text = filteredText
end
end)