Yuari
Documentation
Docs/Script/getscriptbytecode

getscriptbytecode

Returns raw script bytecode. dumpstring is an alias.

Syntax

getscriptbytecode(script: Instance) -> string

Parameters

ParameterTypeDescription
scriptInstanceThe script value used by the call.

Returns

TypeDescription
stringRaw script bytecode

Description

getscriptbytecode is part of the Script library. Script helpers inspect scripts loaded by the client, their bytecode and the Luau threads created for them.

The call is read-only: it resolves the current value when invoked and does not change the underlying state.

The aliases dumpstring(script) resolve to the same implementation.

Example

local script = getscripts()[1]
print(#getscriptbytecode(script), #dumpstring(script))

Notes

  • Aliases: dumpstring(script).
  • Script data reflects the client's live script objects and may change after execution.