mirror of
https://github.com/lune-org/lune.git
synced 2024-12-14 22:51:05 +00:00
18 lines
493 B
Lua
18 lines
493 B
Lua
local roblox = require("@lune/roblox") :: any
|
|
local Instance = roblox.Instance
|
|
|
|
local model =
|
|
roblox.readModelFile("tests/roblox/rbx-test-files/models/three-nested-folders/binary.rbxm")[1]
|
|
|
|
assert(#model:GetChildren() == 1)
|
|
|
|
local newChild = Instance.new("Model")
|
|
newChild.Parent = model
|
|
|
|
assert(#model:GetChildren() == 2)
|
|
assert(table.find(model:GetChildren(), newChild) ~= nil)
|
|
|
|
newChild:Destroy()
|
|
|
|
assert(#model:GetChildren() == 1)
|
|
assert(table.find(model:GetChildren(), newChild) == nil)
|