Hello dev’s, I have been working on an admin panel and implemented filtering to prevent inappropriate kick reasons and to comply with Roblox TOS since these types of things need to be filtered if players are going to see the reason with the current code I have tested and the filtering works but I am wondering if this is enough or I should add fail safes etc. and if so how?
thanks
local ChatFilterService = game:GetService("TextService")
game.ReplicatedStorage.Admin.KickEvent.OnServerEvent:Connect(function(plr,targetuser, reason)
if not table.find(admins, plr.UserId) then plr:Kick("Denied") warn(plr.Name.." Exploit Detected") return end
local Step1 = ChatFilterService:FilterStringAsync(reason, plr.UserId) -- We get
local Filter = Step1:GetNonChatStringForBroadcastAsync()
game.Players:FindFirstChild(targetuser):Kick("Reason: "..Filter)
warn(targetuser.." Has Been Kicked For: "..Filter)
end)