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

Cast Through AnyLuau✎

Luau refuses a cast between unrelated types. Going through `any` is the documented way round it, and the extra step is the point: it marks where you overrode the typechecker rather than agreed with it.

Pending review

BasePart:: any ::
  • the language itself, so it works in Roblox and in Lune
  • pure — no execution pins, wire it anywhere
  • names its result — Result name in the Inspector is the local it binds, and a Declare Local reading that result makes a second one: see Variables and locals

Inputs

  • Value:anymust be wired
  • Type:string= "BasePart"literalfrom a list
    Offers 682 values to pick from, and takes anything else typed in.

Outputs

  • result:BasePart

What it compiles to

luau
print(((value :: any) :: BasePart))

Warning

Type is typed in directly and pasted into the generated source, so it cannot be wired from a value. The editor refuses the connection rather than letting it fail at compile time.

Not reviewed yet