Garry's Mod Wiki

Entity:IsConstraint

  boolean Entity:IsConstraint()

Description

Returns if entity is constraint or not.

This also means that Entity:GetConstrainedPhysObjects. Entity:GetConstrainedEntities and Entity:SetPhysConstraintObjects can be used on this entity.

Some constraint entities, such as phys_spring, will return false!

Returns

1 boolean
Is the entity a constraint or not

Example

Returns true if player 1 is aiming at constraint.

Output: false