I noticed that if a user changes the text in a TextBox, it doesn’t get filtered. This means I have to make my own filtering system.
However, my main concern is typing strings such that are normally filtered by roblox into a table. (The table being the thing looped through to see if the inputted string is inappropriate).
Will I get into some sort of trouble for making my own filtering table?
You need to apply text filtering via TextService:FilterStringAsync(). Do not make your own filtering, Roblox’s is much more advanced and required for public user content.
Here is a small sample that may be applicable to your use case, where remoteEventTextUpdate is the remote event you are using, and sign is a text object to be updated.
local TextService = game:GetService("TextService")
local function getFilteredText(message: string, fromPlayerId: number): string?
local success, textMessage = pcall(TextService.FilterStringAsync, TextService, message, fromPlayerId)
if success then
return textMessage
else
warn("Couldn't filter text, try again")
return nil
end
end
remoteEventTextUpdated.OnClientEvent:Connect(function(player: Player, message)
local filteredText = getFilteredText(message, player.UserId)
if filteredText then
sign.Text = filteredText
end
end)
There is, because players can constantly find bypasses to your system. Roblox can find solutions quicker and you don’t need to update your game for that to happen. Roblox will only be happy if you use their filtering, when filtering user generated strings. I hope if you’re filtering, you’re at least use roblox’s on top of your own?