Nil Values
Nil Values
In Lua, nil is used to represent non-existence or nothingness. It’s frequently used to remove a value in a table or destroy a variable in a script. For instance:
In Roblox, nil can also be used to clear an Instance object’s Instance/Parent|Parent value and effectively remove it from the game, although it may be possible to bring the object back. Consider this example: