Revision Difference
Entity:IsWorld#515990
<function name="IsWorld" parent="Entity" type="classfunc">
	<description>Returns if the entity is the map's Entity[0] worldspawn</description>
	<realm>Shared</realm>
	<rets>
		<ret name="" type="boolean">isWorld</ret>
	</rets>
</function>
⤶
{{Example⤶
| Description = Stool boilerplate for the ignite tool⤶
| Code = function TOOL:LeftClick( trace )⤶
```⤶
⤶
 local ent = trace.Entity
⤶
<example>⤶
	<description>Stool boilerplate for the ignite tool</description>⤶
	<code>⤶
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.⤶
}}	</code>⤶
	<output>LeftClick will not run for no ent, invalid ents, players, or worldspawn.</output>⤶
⤶
</example>
			Garry's Mod 
		
			Rust 
		
			Steamworks 
		
			Wiki Help