mirror of
https://github.com/lune-org/lune.git
synced 2024-12-14 14:11:04 +00:00
18 lines
577 B
Lua
18 lines
577 B
Lua
local roblox = require("@lune/roblox") :: any
|
|
local Instance = roblox.Instance
|
|
|
|
local root = Instance.new("Folder")
|
|
local child = Instance.new("Model")
|
|
local nested = Instance.new("Tool")
|
|
local adjacent = Instance.new("Model")
|
|
local descendant = Instance.new("Part")
|
|
|
|
descendant.Parent = nested
|
|
nested.Parent = child
|
|
adjacent.Parent = child
|
|
child.Parent = root
|
|
|
|
assert(child:FindFirstChildOfClass("Folder") == nil)
|
|
assert(child:FindFirstChildOfClass("Tool") == nested)
|
|
assert(child:FindFirstChildOfClass("Model") == adjacent)
|
|
assert(child:FindFirstChildOfClass("Part") == nil)
|