Garry's Mod Wiki


  Entity:SetPreventTransmit( Player player, boolean stopTransmitting )


Prevents the server from sending any further information about the entity to a player.

You must also call this function on all entity's children. See Entity:GetChildren.

issue tracker

Entity:SetFlexScale and other flex/bone manipulation functions will create a child entity.


1 Player or CRecipientFilter player
The player to stop networking the entity to. Can also be a CRecipientFilter or a table as of March 2024 to affect multiple players at once.
2 boolean stopTransmitting
true to stop the entity from networking, false to make it network again.


This will loop through all children entities of the ent passed and stop networking them too. Works with nextbots/players

function RecursiveSetPreventTransmit( ent, ply, stopTransmitting ) if ( ent ~= ply and IsValid( ent ) and IsValid( ply ) ) then ent:SetPreventTransmit( ply, stopTransmitting ) local tab = ent:GetChildren() for i = 1, #tab do RecursiveSetPreventTransmit( tab[ i ], ply, stopTransmitting ) end end end