Try it in your browserpreview Source

BranchLuau✎

if / else. Any value can be the condition — only `nil` and `false` take the False branch, so an `Instance?` can be tested directly. A Branch on another Branch's False pin compiles to `elseif`, so a chain of conditions stays at one level of indentation and ends with one `end`.

Pending review

BranchTrueFalseCondition
  • the language itself, so it works in Roblox and in Lune

Inputs

  • in:execution
  • Condition:any= true

Outputs

  • True:execution
  • False:execution

What it compiles to

Script StartLuau ExpressionisAliveCodeBranchTrueFalseConditionPrintStill go…ValuePrintGoneValue
The graph this output was compiled from.
luau
if isAlive then
	print("Still going")
else
	print("Gone")
end

Not reviewed yet