rojo-rbx / remodel

Scriptable Roblox multitool: Manipulate instances, model files, places, and assets on Roblox.com
MIT License
169 stars 38 forks source link

Error when iterating through place instances. #71

Closed RealCalumPlays closed 2 years ago

RealCalumPlays commented 2 years ago

Im trying to interate through place instances and this is what I get

[WARN ] Unknown value type ID 0x1f (31) in Roblox binary model file. Found in property AnalyticsService.UniqueId. [ERROR] runtime error: [string "run.lua"]:13: bad argument #1 to 'for iterator' (table expected, got userdata) stack traceback: [C]: in ? [C]: in function 'next' [string "run.lua"]:13: in main chunk

Code:

local game = remodel.readPlaceFile("game.rbxl")

for i, val in pairs(game) do print(val.Name) end

eAi commented 2 years ago

I presume you need to do pairs(game:GetChildren()) as game isn’t a table.

LPGhatguy commented 2 years ago

Hello, thank you for filing an issue!

As @eAi mentioned, this appears to be an error in your code. The first warning in the output is unrelated.