Garry's Mod Wiki

Garry's Mod Wiki

  boolean Entity:IsWorld()

Description

Returns if this entity is the map entity Entity[0] worldspawn.

Returns

1 boolean
Whether this entity is the world entity.

Example

Stool boilerplate for the ignite tool

function TOOL:LeftClick( trace ) local ent = trace.Entity if !ent or !ent:IsValid() or ent:IsPlayer() or ent:IsWorld() then return false end ...
Output: LeftClick will not run for no ent, invalid ents, players, or worldspawn.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...