<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.starfall.wtf/index.php?action=history&amp;feed=atom&amp;title=Nil</id>
	<title>Nil - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.starfall.wtf/index.php?action=history&amp;feed=atom&amp;title=Nil"/>
	<link rel="alternate" type="text/html" href="https://wiki.starfall.wtf/index.php?title=Nil&amp;action=history"/>
	<updated>2026-07-28T16:15:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.starfall.wtf/index.php?title=Nil&amp;diff=488&amp;oldid=prev</id>
		<title>PRG: Created page with &quot;{{CatUp|Tutorials}} __TOC__  == Introduction ==  &#039;&#039;&#039;&quot;Nil&quot;&#039;&#039;&#039; is a &#039;&#039;&#039;noninitialized&#039;&#039;&#039; value, or lack of a value, that is blank and equal to nothing. Arithmetic cannot be performed on nil or anything equivalent to nil, because &#039;nothing&#039;, unlike 0, is not a numerical value. When an object is deleted, using the &#039;:Remove()&#039; function, it is removed from the game completely by setting its parent to nil. Unless the object is referenced, it cannot be recovered.  == U...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.starfall.wtf/index.php?title=Nil&amp;diff=488&amp;oldid=prev"/>
		<updated>2024-12-10T22:24:41Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{CatUp|Tutorials}} __TOC__  == Introduction ==  &amp;#039;&amp;#039;&amp;#039;&amp;quot;Nil&amp;quot;&amp;#039;&amp;#039;&amp;#039; is a &amp;#039;&amp;#039;&amp;#039;noninitialized&amp;#039;&amp;#039;&amp;#039; value, or lack of a value, that is blank and equal to nothing. Arithmetic cannot be performed on nil or anything equivalent to nil, because &amp;#039;nothing&amp;#039;, unlike 0, is not a numerical value. When an object is deleted, using the &lt;a href=&quot;/index.php/Remove&quot; class=&quot;mw-redirect&quot; title=&quot;Remove&quot;&gt;&amp;#039;:Remove()&amp;#039;&lt;/a&gt; function, it is removed from the game completely by setting its parent to nil. Unless the object is referenced, it cannot be recovered.  == U...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{CatUp|Tutorials}}&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;quot;Nil&amp;quot;&amp;#039;&amp;#039;&amp;#039; is a &amp;#039;&amp;#039;&amp;#039;noninitialized&amp;#039;&amp;#039;&amp;#039; value, or lack of a value, that is blank and equal to nothing. Arithmetic cannot be performed on nil or anything equivalent to nil, because &amp;#039;nothing&amp;#039;, unlike 0, is not a numerical value. When an object is deleted, using the [[Remove|&amp;#039;:Remove()&amp;#039;]] function, it is removed from the game completely by setting its parent to nil. Unless the object is referenced, it cannot be recovered.&lt;br /&gt;
&lt;br /&gt;
== Uses ==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Nil&amp;quot; can be used to remove the value of a property of an object. It is very common to set the parent of an object to &amp;quot;Nil&amp;quot;, removing it from the game per se. If the object is referenced by a variable for example, you can bring the object back. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Example script of referencing and object.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
p = Instance.new(&amp;quot;Part&amp;quot;) -- We will create a new grey brick&lt;br /&gt;
p.Parent = game.Workspace -- The part (a grey brick) has a parent, game.Workspace&lt;br /&gt;
p.Parent = nil -- The part now has no parent (and so it disappears).&lt;br /&gt;
p.Parent = game.Workspace -- part still exists because it is referenced by &amp;#039;p&amp;#039;&lt;br /&gt;
p.Parent = nil -- part disappears again (for it has no parent)&lt;br /&gt;
p = nil -- part is no longer referenced by anything, so it gets picked up by the garbagecollector&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Look through the comments in the script above to understand why recovering an object by reference is possible.&lt;br /&gt;
&lt;br /&gt;
Here are more examples of &amp;quot;nil&amp;quot; usage: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
game.Workspace.USERNAME.Humanoid.Health = nil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Using the script above will have the same effects as the following script:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
game.Workspace.USERNAME.Humanoid.Health = 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This occurs because setting a players health to &amp;quot;nil&amp;quot; will cause the player to have nothing as a health. Because nothing is similar to having no health at all, your health will go to 0 and you will gain a wipeout. &lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
[[Absolute beginner&amp;#039;s guide to scripting]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Part|Parts]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Script Creation Walkthrough]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://www.lua.org/pil/1.2.html Programming in Lua:1.2 - Global Variables]&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://www.lua.org/pil/2.1.html Programming in Lua:2.1 - Nil]&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Null_(computer_programming) Null]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting Tutorials]]&lt;/div&gt;</summary>
		<author><name>PRG</name></author>
	</entry>
</feed>