getpcd Synchronous

  • getpcdprop

Read PhysicalConfigData from a triangle mesh part when that SharedString property is available. It returns the stored hash and the raw data separately.

Syntax
Luau
getpcd(instance: TriangleMeshPart) -> (hash: string, data: string)

Parameters

Function parameters
ParameterTypeDescription
instanceTriangleMeshPartTriangleMeshPart-backed Instance, such as a suitable MeshPart.

Returns

(hash: string, data: string)

Two strings: a 16-byte hash and the raw PhysicalConfigData bytes.

Usage notes

This is binary data; avoid printing it directly. The call raises if the property or getter is unavailable.

Example

Example
Luau
local mesh = workspace:FindFirstChildWhichIsA("MeshPart", true)
if mesh then
    local ok, hash, bytes = pcall(getpcd, mesh)
    if ok then print("Hash bytes:", #hash, "Data bytes:", #bytes) end
end
Kawaii documentation