Registers a function that runs for every outgoing packet, before it leaves the client. Inside the hook you can read the packet’s PacketId and Data, rewrite the payload with packet:SetData(...), or drop it entirely with packet:Block().

Parameters

function
required
Called with each outgoing packet.

Example

  • send: send a packet yourself.
  • block: block by id instead.