Items
loads the bytes of a place, a model, or an accessory in a scratch world and reports the facts it finds
Methods
1 member Access: server only
- Examine
(kind: string, bytes: string) -> {[string]: any} load item bytes in a scratch world and answer the facts
Parameters
Name Type Description kind string Asset category: "place", "model", or "accessory". bytes string Raw binary payload of the asset to inspect. returns {[string]: any} —
Vetting Uploaded Item Bytes
Lifecycle: Server
Malformed bytes raise an error, and a header-only answer means the scratch load stopped before the entities.
Luau
local function inspectModel(bytes: string) local ok, facts = pcall(function() return game.Items.Examine("model", bytes) end) if not ok then warn("Model rejected:", facts) return end if not facts.loaded then print(string.format("Header only, %d bytes", facts.head.byte_len)) return end print(string.format("%d entities under %d roots", facts.entities, facts.root_count))end Output: 12 entities under 3 roots