Garry's Mod Wiki


  boolean Entity:OnGround()


Returns true if the entity is on the ground, and false if it isn't.

Internally, this checks if FL_ONGROUND is set on the entity. This is only updated for players and NPCs, and thus won't inherently work for other entities.


1 boolean
Whether the entity is on the ground or not.


Prints if Entity(1) is on the ground or not.

print( Entity( 1 ):OnGround() ) print( Entity( 1 ):IsFlagSet( FL_ONGROUND ) ) -- This should give exact same output as the first line
Output: In most cases, true.