You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
wanted to filter a textbox
What is the issue? Include screenshots / videos if possible!
trying to filter the textbox
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
nope
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
ok
-- how can i make a filter for textbox
--ofc i cant code
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
ok
i just want to filter a textbox
ofc im not showing a video if it works or not
textbox.Changed:Connect(function()
textbox.Text = TextService:FilterStringAsync(textbox.Text, game.Players.LocalPlayer.UserId);
end)
-- Try that! Note: I never used this function so it could be incorrect
-- on the way I handled it.
If that doesn’t work, I think I have a solution that doesn’t need FilterStringAsync:
if text.Text ~= string.sub(0, #string) then
repeat wait(0.1) until text.Text ~= " "
end
-- make sure text variable is the text box that you want players to type in
its a death screen you can customize it i just wanted filter to prevent putting bad words and deleting my account
by the way its need to be roblox filter bc its good
local banned_words = {
"bad word",
"something else",
"etc"
}
TextBox.Changed:Connect(function()
if TextBox.Text == [1, #banned_words] then --if this line errors than put parentheses over 1 and banned words
TextBox.Text = "Will not load text" --or something else
end
end)