Truthy and falsy

Whether a value makes an if run. In Luau only false and nil are falsy.

Think of it as A bouncer who only turns away two names: false and nil.

An if, a while or an and/or looks at a value and asks whether it is truthy. Luau treats every value as truthy except false and nil, so 0, an empty string and an empty table all count as true. To ask whether a balance is empty, compare it: coins == 0.

Official reference: create.roblox.com

Related terms