Garry's Mod Wiki


  boolean IsValid( any toBeValidated )


Returns whether an object is valid or not. (Such as entities, Panels, custom table objects and more).

Checks that an object is not nil, has an IsValid method and if this method returns true. If the object has no IsValid method, it will return false.

Due to vehicles being technically valid the moment they're spawned, also use Vehicle:IsValidVehicle to make sure they're fully initialized.


1 any toBeValidated
The table or object to be validated.


1 boolean
True if the object is valid.