mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
21 lines
607 B
Text
21 lines
607 B
Text
local roblox = require("@lune/roblox")
|
|
local Instance = roblox.Instance
|
|
|
|
local root = Instance.new("Folder")
|
|
local child = Instance.new("Model")
|
|
local descendant = Instance.new("Part")
|
|
|
|
child.Parent = root
|
|
descendant.Parent = child
|
|
|
|
assert(not root:IsDescendantOf(root))
|
|
assert(child:IsDescendantOf(root))
|
|
assert(descendant:IsDescendantOf(root))
|
|
|
|
assert(not root:IsDescendantOf(child))
|
|
assert(not child:IsDescendantOf(child))
|
|
assert(descendant:IsDescendantOf(child))
|
|
|
|
assert(not root:IsDescendantOf(descendant))
|
|
assert(not child:IsDescendantOf(descendant))
|
|
assert(not descendant:IsDescendantOf(descendant))
|