Good day all, i want to know how can i use textfiltering, because now I have a UI where players can type something and it will appear on a part, but your can say anything, so I want to use the defualt roblox textfilter to filter the text first before showing it
Here are my 2 sections where I would like to integrate it in.
Boothtitle.OnServerEvent:Connect(function(player, text)
for _, booth in pairs(boothFolder:GetChildren()) do
if booth:IsA("Model") then
local ownerSign = booth:FindFirstChild("OwnerSign")
if ownerSign and ownerSign:GetAttribute("Owner") == player.UserId then
local boothUISFolder = booth:FindFirstChild("SurfaceUis")
if boothUISFolder then
local boothTitleGui = boothUISFolder:FindFirstChild("BoothTitle")
if boothTitleGui then
local surfaceGui = boothTitleGui:FindFirstChildWhichIsA("SurfaceGui")
if surfaceGui then
local titleLabel = surfaceGui:FindFirstChild("TITLE")
if titleLabel then
titleLabel.Text = tostring(text)
surfaceGui.Enabled = true
end
end
end
end
break
end
end
end
end)
BoothDescription.OnServerEvent:Connect(function(player, Text)
for _, booth in boothFolder:GetChildren() do
local OwnerSign = booth:FindFirstChild("OwnerSign")
if OwnerSign and OwnerSign:GetAttribute("Owner") == player.UserId then
local SurfaceGUI = booth:FindFirstChild("SurfaceUis")
if SurfaceGUI then
local BoothDescriptionPart = SurfaceGUI:FindFirstChild("BoothDescription")
if BoothDescriptionPart then
local TestGUI = BoothDescriptionPart:FindFirstChildWhichIsA("SurfaceGui")
if TestGUI then
local TestDescription = TestGUI:FindFirstChildWhichIsA("TextLabel")
TestDescription.Text = tostring(Text)
else
end
end
end
end
end
end)