mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
14 lines
527 B
Text
14 lines
527 B
Text
local fs = require("@lune/fs")
|
|
local roblox = require("@lune/roblox")
|
|
|
|
local modelFile = fs.readFile("tests/roblox/rbx-test-files/models/three-nested-folders/binary.rbxm")
|
|
local model = roblox.deserializeModel(modelFile)[1]
|
|
|
|
local child = model:FindFirstChild("Parent")
|
|
assert(child ~= nil)
|
|
local descendant = child:FindFirstChild("Child")
|
|
assert(descendant ~= nil)
|
|
|
|
assert(descendant:GetFullName() == "Grandparent.Parent.Child")
|
|
assert(child:GetFullName() == "Grandparent.Parent")
|
|
assert(model:GetFullName() == "Grandparent")
|