canaryThese pages document the canary: an unreleased build. What they describe may not be in the version you have, and may change before it is.The stable build
Try it in your browsercanary Source

ErrorLuau✎

Raises an error and stops the thread. Level 1 blames the caller, 2 blames the caller's caller, 0 attaches no position at all.

Pending review

ErrorSomethin…Message1Level
  • the language itself, so it works in Roblox and in Lune

Inputs

  • in:execution
  • Message:string= "Something went wrong"
  • Level:number= 1

Outputs

  • then:execution

What it compiles to

luau
error("Something went wrong", 1)

Not reviewed yet