Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What does nil means? Is it a data detector or something like that?

Hi, am a new scripter, and i want to know what "nil" means does it means something about something with a value that means something?

2 comments

0

Nil represents the absence of any value. In other words, nil = nothing.

0

@Y0_dude YES!!! Exactly!

1 answer

✓ Accepted answer

nil isn't none-thing I personally use very much, but it is fairly useful.

nil is a value that represents nothing. Not 0, not an empty string, but nothing.


Some uses of nil can be an alternate for the "Destroy()" function:

workspace.Part.Parent = nil vs workspace.Part:Destroy()


Another use of nil is for values. Specifically, ObjectValues.

model.Settings.ItemLocation.Value = nil . In the example above, we could say an item is "out of stock", so the item's location is nil.


These are just a few of the uses for the built-in variable, nil, which is a value representing nothing.

Now that your rev has been filled up, go ahead and blast off!

If you have any further questions, message me here:

www.roblox.com/users/312047434/profile

This discussion is preserved as it was. New answers, comments, and votes are closed.