I made a Police Radio script. All i want is to Filter messages to make people don't swear through the radio. But i don't know how to make it, and no tutorials are clear! Can you help me?
Normal script in ServerScriptService:
local PoliceMessages = game.Workspace:WaitForChild("PoliceMessages")
local TextService = game:GetService("TextService")
game.ReplicatedStorage.PoliceMessage.OnServerEvent:Connect(function(Player, Text, StateChosen)
local NewChat = Instance.new("StringValue", workspace.PoliceMessages:FindFirstChild("State"..StateChosen))
NewChat.Name = (Player.Name.." : "..Text)
end)
Can you plz tell me how to do it or just write the good script?

1 comment
There is probably a way to make it so that the script detects if there is a specific combination of letters in a word (for ex: F and ck in the same word or B and t and c and so on..) it would turn it into ######.