Hello! I am trying to solve a problem in my game. Sending a lot of requests to filter a certain piece of text is necessary, but Roblox does not like it. I am currently using
game.Chat:FilterStringForBroadcast
By the way, the constant filtering happens when a player updates the text on a sign.
local changed = game.Chat:FilterStringForBroadcast(script.Parent.Config.Text.Value,game.Players:FindFirstChildWhichIsA("Player"))
script.Parent.Part.SurfaceGui.TextLabel.Text = changed
script.Parent.Part.SurfaceGui.TextLabel.TextSize = script.Parent.Config.TextSize.Value
script.Parent.Part.SurfaceGui.TextLabel.TextScaled = script.Parent.Config.TextScaled.Value
script.Parent.Part.SurfaceGui.TextLabel.TextColor3 = script.Parent.Part.Color
if script.Parent:IsDescendantOf(workspace.Plots) then
script.Parent.Part.Transparency = .5
else
script.Parent.Part.Transparency = 1
end
if script.Parent.Config.TextStroke.Value == true then
script.Parent.Part.SurfaceGui.TextLabel.TextStrokeTransparency = 0
else
script.Parent.Part.SurfaceGui.TextLabel.TextStrokeTransparency = 1
end
Any help on being able to find a better method that accepts a greater amount of requests or a way to increase the limit in general would be really helpful. Thank you.
local changed
local success, response = pcall(function()
changed = game.Chat:FilterStringForBroadcast(script.Parent.Config.Text.Value,game.Players:FindFirstChildWhichIsA("Player"))
end)
if success then
... -- code here
else
-- warn the player that it did not went through
warn(response)
end
That’s what I have currently now. I want to find a way to be able to get more requests through instead of just stopping errors. Thank you for the response though.
I suggest to filter only from the original model WHILE it gets created, then when it is done you just clone everything which has already been made so you do not have to worry about filtering when cloning the object.