IsValid
Description
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.
If you are sure that the object you are about to check is not
nil and has the IsValid method, it would be more faster to call it directly rather than using IsValid.Due to vehicles being technically valid the moment they're spawned, also use Vehicle:IsValidVehicle to make sure they're fully initialized.
Putting a number in the argument will cause an error.
Arguments
Returns
Page views: 61,580
Updated: Yesterday
Updated: Yesterday
Garry's Mod
Rust
Steamworks
Wiki Help