Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 7 years ago
Edited 7 years ago

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?

0
Nil represents the absence of any value. In other words, nil = nothing. RayCurse 1518 — 7y
0
@Y0_dude YES!!! Exactly! ReadyHappiness 109 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

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

Ad

Answer this question