nil: Nothing Here: Coding lesson for kids
In “nil: Nothing Here”, children learn about local x print(x), if x == nil then and x = nil.
local x print(x): A variable that has never been given a value is nil — Lua's way of saying "nothing here.".
if x == nil then: Checks whether a variable currently has no value — a common safety check before using it.
x = nil: You can also SET a variable to nil to clear it. nil means "no value right now", not that the variable was never used.
This lesson is part of Lua in Coding at Pearls Valley Academy — The language behind Roblox’s Luau.
Each lesson starts with a short narrated, animated explanation, then hands-on practice. A wrong answer gets a gentle hint, never a penalty, and children earn stars and pearls as they go.