getbspval Synchronous
Read a BinaryString reflection property. Choose Base64 output when the bytes must be printed, stored in JSON, or sent through a text-only channel.
Luau
getbspval(instance: Instance, property: string, base64: boolean?) -> stringParameters
| Parameter | Type | Description |
|---|---|---|
instance | Instance | Instance owning the BinaryString property. |
property | string | Case-sensitive name of a BinaryString property. |
base64 | boolean? | Optional boolean; true encodes the raw bytes as Base64. |
Returns
stringRaw binary bytes as a Luau string, or printable Base64 text when base64 is true.
Usage notes
The function rejects properties of other types. A property can exist yet be unavailable on a particular class or runtime build.
Example
Luau
local terrain = workspace.Terrain
local ok, encoded = pcall(getbspval, terrain, "SmoothGrid", true)
if ok then
print("Base64 characters:", #encoded)
else
print("Binary property unavailable:", encoded)
end