Place a return after the kick line.
Otherwise, the loop might continue after it kicks a player and cause an error.
local kickstrings = { "test", "these", "strings" } --Make sure these are ALL lowercase
function NameKicker( ply )
local pname = string.lower( ply:Nick() )
for k, v in pairs( kickstrings ) do
if string.find( pname, v ) then
ULib.kick( ply, "Auto-Kicked for having the string " .. v .. " in your name. Please change your name and rejoin" )
return
end
end
end
hook.Add( "PlayerInitialSpawn", "NameKicker", NameKicker )