Try it in your browserpreview Source

For Each (Array)Luau✎

Generic for over an array (ipairs). Index name and Value name in the Inspector decide what the two loop variables are called; left blank they are `i` and `value`. Value type annotates the value and types its pin — an array's index is a number and has nothing to choose.

Pending review

For Each (Array)BodyCompletedArrayIndexValue
  • the language itself, so it works in Roblox and in Lune

Inputs

  • in:execution
  • Array:tablemust be wired

Outputs

  • Body:execution
  • Completed:execution
  • Index:number
  • Value:any

What it compiles to

Script StartLuau ExpressionplayersCodeFor Each (Array)BodyCompletedArrayIndexValuePrintValue
The graph this output was compiled from.
luau
for i, value in ipairs(players) do
	print(value)
end

Not reviewed yet